Default console logs
Gleap collects:- Standard output and error: everything your app writes with
print(),NSLogor tostdout/stderr. The output still shows up in the Xcode console. - Unified logging: messages your app’s process sends with
os_logorLogger(for example React Native’s JavaScript console). Errors and faults are marked as errors. Values that are not logged withprivacy: .publicshow as<private>, as they do in Console.app. - Custom logs added with
Gleap.log.
print, NSLog) are captured in debug and release builds. Unified logging entries (os_log, Logger) are read from the last 180 seconds only, at most 300 of them. Entries are cut at 1000 characters (5000 for ERROR entries) and marked … [truncated]. To opt out, call disableConsoleLog() before initializing Gleap (see below).
This applies to SDK v19.0.0 and newer. Older versions collected only
os_log messages on iOS 15 and later (print output was missing and NSLog showed as <private>), and needed enableDebugConsoleLog in debug builds. enableDebugConsoleLog is no longer needed and has no effect.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. Custom logs are still attached.- Swift
- Objective-C
Custom logs
Custom logs allow you to create logs in the Gleap activity log. There are three severity types available for logs:ERROR, WARNING and INFO.
- Swift
- Objective-C
INFO. Use the following method to explicitly set the severity.
- Swift
- Objective-C