2

I'm currently using the CocoaLumberjack framework for cocoa/touch applications and it's very good. Does anyone know the simplest way to tell the file logger to use say "Verbose" log level and the console logger to use "Info" or "Warn". This would effectively generate detailed files in the event of something going wrong but not fill up a release version's console.

oguz ismail
  • 1
  • 16
  • 47
  • 69
Mitchell Currie
  • 2,769
  • 3
  • 20
  • 26

1 Answers1

0

You can force a specific log level for each logger. We use two additional loggers with different log levels.

DDFileLogger* fileLogger = [[DDFileLogger alloc] init];
fileLogger.rollingFrequency = 60 * 60 * 24; // every 24 hours
fileLogger.logFileManager.maximumNumberOfLogFiles = 7; // roll everyday and keep 7 days worth.


[DDLog addLogger:fileLogger withLevel:DDLogLevelVerbose];
[DDLog addLogger:paperTrailLogger withLevel:DDLogLevelError];
[DDLog addLogger:[DDTTYLogger sharedInstance] withLevel:DDLogLevelVerbose];
Nick N
  • 984
  • 9
  • 22