Logging

Out of the box Bugsee automatically captures all standard applications console logs (print, NSLog, os.log) both from Swift and Objective-C, both on iOS 10 and prior. If that behavior is not desired, it can be disabled though Bugsee launch options, see BugseeCaptureLogsKey option in configuration.

Alternatively, we provide other methods to log messages directly into Bugsee reports. These methods maintain log levels for each message and later allow filtering in Bugsee report viewer.

CocoaLumberjack logger

If you are using CocoaLumberjack, Bugsee includes a logger that can be hooked to Lumberjack.

Objective-C

[DDLog addLogger:(id <DDLogger>)[BugseeLogger sharedInstance]];

Swift

BugseeLogger.install() 

Logging API

You can use Bugsee logging interface directly, we provide two API functions for send a message to a log:

Objective-C

// With default log level (normal)
[Bugsee log:@"Some log message"];

// Set the log level explicitly
// Levels are BugseeLogLevelLow, BugseeLogLevelError, BugseeLogLevelWarning,
// BugseeLogLevelInfo, BugseeLogLevelDebug and BugseeLogLevelVerbose
[Bugsee log:@"Some log message" level:BugseeLogLevelInfo];

Swift

// With default log level (normal)
Bugsee.log("Some log message")

// Set the log level explicitly
// Levels are BugseeLogLevelLow, BugseeLogLevelError, BugseeLogLevelWarning,
// BugseeLogLevelInfo, BugseeLogLevelDebug and BugseeLogLevelVerbose
Bugsee.log("Some log message", level:BugseeLogLevelInfo)