CustomLogLevelsAppDelegate.m 825 B

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // CustomLogLevelsAppDelegate.m
  3. // CustomLogLevels
  4. //
  5. // CocoaLumberjack Demos
  6. //
  7. #import "CustomLogLevelsAppDelegate.h"
  8. #import "MYLog.h"
  9. // Debug levels: off, fatal, error, warn, notice, info, debug
  10. static const DDLogLevel ddLogLevel = LOG_LEVEL_DEBUG;
  11. @implementation CustomLogLevelsAppDelegate
  12. @synthesize window;
  13. - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
  14. {
  15. // since the verbose log level was undefined, we need to specify the log level for every logger
  16. [DDLog addLogger:[DDASLLogger sharedInstance] withLevel:LOG_LEVEL_DEBUG];
  17. [DDLog addLogger:[DDTTYLogger sharedInstance] withLevel:LOG_LEVEL_DEBUG];
  18. DDLogFatal(@"Fatal");
  19. DDLogError(@"Error");
  20. DDLogWarn(@"Warn");
  21. DDLogNotice(@"Notice");
  22. DDLogInfo(@"Info");
  23. DDLogDebug(@"Debug");
  24. }
  25. @end