Created
October 23, 2014 09:23
-
-
Save cocoajin/572e77d2e2b248d7de05 to your computer and use it in GitHub Desktop.
mac,ios 项目屏蔽日志输出的宏
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//其中 __OPTIMIZE__ 为 项目在 release模式下 | |
#ifndef __OPTIMIZE__ | |
# define NSLog(...) NSLog(__VA_ARGS__) | |
#else | |
# define NSLog(...) {} | |
#endif | |
//log 打印开关 1为开,0为关 | |
#define PSBCLogDebug 0 | |
#if PSBCLogDebug | |
#define NSLog(...) NSLog(@" --- %@", [NSString stringWithFormat:__VA_ARGS__]); | |
#else | |
#define NSLog(...) | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment