您的位置:首页 > 其它

NSLog宏定义,发布后默认不打印

2015-07-03 17:19 204 查看
设置如图: DEBUG=1



头文件写如下宏:

#ifdef DEBUG

#define DLog( s, ... ) NSLog( @"<%p %@:(%d)> %@", self, [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )

#else

#define DLog( s, ... )

#endif
即可
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: