MagicalRecord not using CocoaLumberJack

118 Views Asked by At

I want to add verbose logging to MagicalRecord to try and capture any errors that are happening as I’ve had a couple of users report data loss.

I have followed the instructions here: https://github.com/magicalpanda/MagicalRecord/wiki/Logging

CocoaLumberJack is included in the .pch and, for good measure, at the top of App Delegate includes.

@import CocoaLumberjack;
static const DDLogLevel ddLogLevel = DDLogLevelAll;

MagicalRecord is included as the last include in App Delegate.

#import <MagicalRecord/MagicalRecord.h> // import last so it is included after CocoaLumberjack

The App Delegate instantiates CocoaLumberJack and then later MagicalRecord.

I have set the logging level in MR to verbose:

[MagicalRecord setLoggingLevel:MagicalRecordLoggingLevelVerbose];

I can see the MR logging coming out in the console, but it is not getting sent to CocoaLumberJack which is set to also write the logs to file.

I am using CocoaPods, the highlights of my podfile are

platform :ios , '10.0'
swift_version = "4.0"

use_frameworks!

pod 'MagicalRecord'
pod 'MagicalRecord/CocoaLumberjack'

pod 'CocoaLumberjack'

What am I missing?

0

There are 0 best solutions below