Logging
The Didomi SDK on iOS will log various informational and error messages.
As recommended by Apple, we use two mechanisms for logging:
Formats
iOS 9 - NSLog
Messages logged with NSLog
use the format: Didomi - {LEVEL} - {Message}
Example: Didomi - ERROR - Didomi SDK is not ready
iOS 10+ - os_log
Messages logged with os_log
use the type type to indicate the level and the following information:
Subsystem:
Bundle.main.bundleIdentifier
orio.didomi.sdk
if the bundler identifier is not availableCategory:
Didomi
Example:
Levels
We use the standard log levels supported by os_log: debug
, error
, info
, and fault
.
You can decide what level of logs should be displayed by the SDK by calling the setLogLevel function:
Make sure that the call to setLogLevel
is done before the call to initialize
or some messages will be logged at the wrong level.
If your app supports iOS 9, use the actual value of the error level instead of OSLogType
:
Level | Value |
| 1 |
| 2 |
| 16 |
| 17 |
Last updated