-
Notifications
You must be signed in to change notification settings - Fork 46
/
main.m
33 lines (29 loc) · 887 Bytes
/
main.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#import <UIKit/UIKit.h>
#import "MITLogging.h"
#import "MITLogFormatter.h"
void mit_logger_init( void );
int main(int argc, char *argv[]) {
@autoreleasepool {
mit_logger_init();
return UIApplicationMain(argc, argv, @"UIApplication", @"MIT_MobileAppDelegate");
}
}
void mit_logger_init( void )
{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
{
DDASLLogger *logger = [DDASLLogger sharedInstance];
logger.logFormatter = [[MITLogFormatter alloc] init];
[DDLog addLogger:logger];
}
#if defined(DEBUG)
{
DDTTYLogger *logger = [DDTTYLogger sharedInstance];
logger.logFormatter = [[MITLogFormatter alloc] init];
[DDLog addLogger:logger];
}
#endif //DEBUG
DDLogCVerbose(@"Lumberjack logging initialized");
});
}