标签:blog http ar os sp for strong on log
//.pch
//如果需要打印日志下行不注释,否:注释下行。
#define __SHOW__NSLOG__
#ifdef __SHOW__NSLOG__
#define DebugLog( s, ... ) NSLog( @"<%p %@:(%d)> %@", self, [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )
#else
#define DebugLog( s, ... ) {}
#endif
选择工程的Target -> Build Settings -> Preprocessor Macros.
如图,默认 Debug项,是“DEBUG=1”.
标签:blog http ar os sp for strong on log
原文地址:http://www.cnblogs.com/liman1990/p/4122764.html