📖 Console logs
The Gleap iOS SDK collects console logs for the Release
profile by default. Further more you can make use of our custom logs, which offer more control over the logs.
Default console logs
Console logs are enabled by default on Release
profile builds. In debug mode, console logs are disabled by default.
Enable console logs in debug mode
You can enable console logs in debug mode by calling the following method. Make sure to call this method BEFORE
initializing the Gleap SDK.
Gleap.enableDebugConsoleLog();
Please note that this can lead to freezing or crashing applications, depending on what 3rd party libraries you have installed. If you encounter an app freeze with this option enabled, please disable it again or remove 3rd parties, that also rewire the console logs (like Firebase Crashlytics or Sentry).
Disable default console logs
It is possible to disable the default collection of console logs by calling the following method prior to the initialization of Gleap.
Gleap.disableConsoleLog();
Custom logs
Custom logs allow you to create logs in the Gleap activity log. There are three severnity types available for logs: ERROR
, WARNING
and INFO
.
Gleap.log(message: 'message');
By default logs will be created with the severnity INFO
. Use the following method to explicitly set the severnity.
Gleap.log(message: 'error message', logLevel: LogLevel.ERROR);