mirror of
https://github.com/CocoaLumberjack/CocoaLumberjack.git
synced 2026-05-07 20:12:46 +00:00
43 lines
904 B
Objective-C
43 lines
904 B
Objective-C
//
|
|
// GlobalLogLevelAppDelegate.m
|
|
// GlobalLogLevel
|
|
//
|
|
// CocoaLumberjack Demos
|
|
//
|
|
|
|
#import "GlobalLogLevelAppDelegate.h"
|
|
#import "Stuff.h"
|
|
#import "MyLogging.h"
|
|
|
|
DDLogLevel ddLogLevel;
|
|
|
|
@implementation GlobalLogLevelAppDelegate
|
|
@synthesize window;
|
|
|
|
static void someFunction(void)
|
|
{
|
|
DDLogError(@"%@: C_Error", THIS_FILE);
|
|
DDLogWarn(@"%@: C_Warn", THIS_FILE);
|
|
DDLogInfo(@"%@: C_Info", THIS_FILE);
|
|
DDLogVerbose(@"%@: C_Verbose", THIS_FILE);
|
|
}
|
|
|
|
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
|
|
{
|
|
ddLogLevel = DDLogLevelVerbose;
|
|
[DDLog addLogger:(id<DDLogger>)[DDTTYLogger sharedInstance]];
|
|
|
|
DDLogError(@"%@: Error", THIS_FILE);
|
|
DDLogWarn(@"%@: Warn", THIS_FILE);
|
|
DDLogInfo(@"%@: Info", THIS_FILE);
|
|
DDLogVerbose(@"%@: Verbose", THIS_FILE);
|
|
|
|
someFunction();
|
|
|
|
ddLogLevel = DDLogLevelWarning;
|
|
|
|
[Stuff doStuff];
|
|
}
|
|
|
|
@end
|