标签:
经常在源码中看到类似于如此定义debug模式
#if DEBUG #define NSLog(FORMAT, ...) fprintf(stderr,"\nfunction:%s line:%d\n%s\n", __FUNCTION__, __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]); #else #define NSLog(FORMAT, ...) nil #endif
其中对那些__FUCTION__, __LINE__宏不知道代表什么,网上查看资料
http://blog.csdn.net/fullsail/article/details/2345225#comments
http://onevcat.com/2011/12/debug-2/
https://gcc.gnu.org/onlinedocs/gcc-3.3.5/gcc/Function-Names.html
http://stackoverflow.com/questions/4434282/visual-c-equivalent-of-file-line-and-pretty-function
这些对日志跟踪很有用。
标签:
原文地址:http://www.cnblogs.com/jxufelilu-blog/p/5029903.html