DDOSLogger.sharedInstance logging only seems to log error level logging in console app

604 views Asked by At

Using the typical DDLog.add(DDOSLogger.sharedInstance, with: .all) code to add the OSLog output to CocoaLumberjack logging in my iOS app.

When I look at the console for the app running in the iOS simulator I see error level logging, but nothing more (particularly, no debug level logging). This is in a DEBUG build of the app and it has:

#if DEBUG
    dynamicLogLevel = DDLogLevel.debug
#else
    dynamicLogLevel = DDLogLevel.error
#endif

I suspect this is a configuration/setup problem but I have not been able to figure it out.

One more clue: os_log("test via os_log") does show up in console app.

1

There are 1 answers

2
Marius On BEST ANSWER

Default behaviour of Console.app is to hide the info/debug messages.

To view them, in the Console.app, select Include Info/Debug Messages from the Action Menu.

More info here: https://github.com/CocoaLumberjack/CocoaLumberjack/issues/1006#issuecomment-451435346.