Log Level¶
The SDK automatically outputs logs, allowing you to verify its behavior from their contents. You can control the volume of logs by specifying the log level.
The log level is a setting that controls the “level of detail” in the logs output by the SDK. Higher levels (priorities) result in less detail, meaning less information is output.
You can change the log level to one of the followings:
ErrorWarningInfo(by default)Debug
The logs output for each log level are as follows.
Log Level |
Description |
|---|---|
|
This is the lowest level of detail. Logs are output when SDK processing fails. |
|
The SDK logs retryable and recoverable issues. |
|
The SDK’s primary operations are logged. This is the default level. |
|
This is the highest level of detail. Logs of the SDK’s internal operations are output. |
Note
Specifying a particular log level will output all logs of lower detail levels.
When verifying SDK functionality, please specify the highest level of detail, Debug. Specifying Debug allows you to view logs useful for functionality verification, such as the implemented event tracking and user profile.
We recommend specifying a lower level of detail at release to reduce the load on users’ devices.
Log output location
The log is output to the IDE console.
The output is displayed in the following locations for iOS (Xcode) and Android (AndroidStudio), respectively.
iOS(Xcode):[View] > [Debug Area] > [Activate Console]
Android(AndroidStudio):[View] > [Tool Windows] > [Logcat]
Set log level¶
// ERROR
[Repro setLogLevel:RPRLogLevelError];
// WARNING
[Repro setLogLevel:RPRLogLevelWarn];
// INFO
[Repro setLogLevel:RPRLogLevelInfo];
// DEBUG
[Repro setLogLevel:RPRLogLevelDebug];
// ERROR
Repro.set(logLevel: .error)
// WARNING
Repro.set(logLevel: .warn)
// INFO
Repro.set(logLevel: .info)
// DEBUG
Repro.set(logLevel: .debug)
// ERROR
Repro.setLogLevel(Log.ERROR);
// WARNING
Repro.setLogLevel(Log.WARN);
// INFO
Repro.setLogLevel(Log.INFO);
// DEBUG
Repro.setLogLevel(Log.DEBUG);
// ERROR
Repro.setLogLevel(Log.ERROR)
// WARNING
Repro.setLogLevel(Log.WARN)
// INFO
Repro.setLogLevel(Log.INFO)
// DEBUG
Repro.setLogLevel(Log.DEBUG)
// ERROR
ReproCpp::setLogLevel("Error");
// WARNING
ReproCpp::setLogLevel("Warn");
// INFO
ReproCpp::setLogLevel("Info");
// DEBUG
ReproCpp::setLogLevel("Debug");
// ERROR
Repro.SetLogLevel ("Error");
// WARNING
Repro.SetLogLevel ("Warn");
// INFO
Repro.SetLogLevel ("Info");
// DEBUG
Repro.SetLogLevel ("Debug");
// ERROR
Repro.setLogLevel("Error");
// WARNING
Repro.setLogLevel("Warn");
// INFO
Repro.setLogLevel("Info");
// DEBUG
Repro.setLogLevel("Debug");
// ERROR
Repro.setLogLevel(Repro.LOGLEVEL_ERROR);
// WARNING
Repro.setLogLevel(Repro.LOGLEVEL_WARN);
// INFO
Repro.setLogLevel(Repro.LOGLEVEL_INFO);
// DEBUG
Repro.setLogLevel(Repro.LOGLEVEL_DEBUG);
// ERROR
await Repro.setLogLevel(LogLevel.error);
// WARNING
await Repro.setLogLevel(LogLevel.warn);
// INFO
await Repro.setLogLevel(LogLevel.info);
// DEBUG
await Repro.setLogLevel(LogLevel.debug);