4

I want to replace NSLog with CocoaLumberjack, and I follow the GettingStarted, then add

DDLogError(@"This is an error.");
DDLogWarn(@"This is a warning.");
DDLogInfo(@"This is just a message.");
DDLogVerbose(@"This is a verbose message.");

but why there is no log message in XCode's console?

oguz ismail
  • 1
  • 16
  • 47
  • 69
Mil0R3
  • 3,876
  • 4
  • 33
  • 61

2 Answers2

17

Lumberjack is a generic logging framework. You have to config it to use one (or more) specific log outputs. E.g., for Apple's console, you have to use:

[DDLog addLogger:[DDASLLogger sharedInstance]];

For terminal:

[DDLog addLogger:[DDTTYLogger sharedInstance]];
Matthias
  • 8,018
  • 2
  • 27
  • 53
2

DDASLLogger is deprecated as of iOS 10.

You should use DDOSLogger

ddlog.add(DDOSLogger.sharedInstance)

ahbou
  • 4,710
  • 23
  • 36