React Native SDK Log Levels
The SDK includes a built-in logger that uses the system logger to log various messages, such as debug information, warnings, and errors. You can configure the logging level to enable all logs, disable logging entirely, or set a custom level.
Note: All logs are tagged with tag:[DY] so you can filter them in your log system.
Supported log levels
Each log level prints all log levels above it as well. The default logging level is WARN
in React, which means the logger prints logs with the following levels: WARN
, ERROR
, and CRITICAL
.
Swift Log Levels |
---|
VERBOSE |
DEBUG |
INFO |
NOTICE |
WARN - default |
ERROR |
CRITICAL |
OFF |
Customize the log level
Use this function to modify the default logging level:
async function setTheLogLevel() {
setLogLevel(LogLevel.VERBOSE).then(result => {
//Log the result
console.log('Log level set successfully:', result);
}).catch(error => {
// handle error
console.error('setLogLevel failed:', error);
});
}
Updated about 3 hours ago