- Put these 2 files into your project.
- Add
#import "LoggingConfig.h"to your{ProjectName}-Prefix.pchfile in your project.
You'll no longer need to define ddLogLevel in every file any more.
| // | |
| // LoggingConfig.h | |
| // | |
| // Created by nickcheng on 12-11-12. | |
| // Copyright (c) 2012年 nx. All rights reserved. | |
| // | |
| #import "DDLog.h" | |
| extern int const ddLogLevel; |
| // | |
| // LoggingConfig.m | |
| // | |
| // Created by nickcheng on 12-11-12. | |
| // Copyright (c) 2012年 nx. All rights reserved. | |
| // | |
| #import "LoggingConfig.h" | |
| #ifdef DEBUG | |
| int const ddLogLevel = LOG_LEVEL_VERBOSE; | |
| #else | |
| int const ddLogLevel = LOG_LEVEL_WARN; | |
| #endif |