iOS
Ui Kit Logger

Log level

The default log level for iOS is none. You can set the log level through the setLogLevel() method in the SBUMain class. If you are developing your app in Swift, you can first set a single log type and use a logType array to specify all log types at once. In Objective-C, you can set a single log type and then use a bit mask to specify all log types at once.

Objective-C
Swift
Light Color Skin
Copy
// Output all logs
[SBUMain setLogLevel:LogTypeAll];
// Output only specific logs
[SBUMain setLogLevel:LogTypeError|LogTypeInfo];
Light Color Skin
Copy
// Output all logs
SBUMain.setLogLevel(.all)
// Output only specific logs
SBUMain.setLogLevel([.error, .info])
ParameterDescription

type

Type: LogType (enum)
Specifies one or more severity types of log to retrieve. You can select either a single or multiple log level types. Acceptable values are none, error, warning, info, and all.


Log types

TypeDescription

none

No logs recorded.

error

Logs what have caused failures in the specific events, but not an UIKit-wide failure.

warn

Logs unexpected events which wouldn’t affect the operation of UIKit, but might cause problems.

info

Logs general events of UIKit.

all

Logs all detailed information of the events and activities, including info, warning, and error.


Log format

Log messages as output are displayed on the console in the order as follows:

Light Color Skin
Copy
{date time} {tag} {type} {thread} {classFuncName} | {message}