CustomLogLevelsAppDelegate.m 737 B

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