Log control
Control your logs by configuring logLevel and logHandler.
By default, the SDK tries not to spam your console and will print only when something critical has happened; however, sometimes, it makes sense to know what is going on under the hood.
You can choose the desired logLevel
from .off
that logs nothing, through .error
(default), .warning
, .info
, .debug
, and up to .trace
that will try to log as much as possible.
sdk.logLevel = .error
Log interception
By default, the SDK uses NSLog
for logging purposes. If, for some reason, it does not work for you, feel free to use logHandler
to intercept log messages and direct them as required.
sdk.logHandler { (level, message) in
print(Date(), "[Idensic] \(message)")
}
Updated 8 days ago