NSLog

作者: 简闻 | 来源:发表于2016-11-07 20:35 被阅读22次

打印输出调试

#ifdef DEBUG
#define LRString [NSString stringWithFormat:@"%s", __FILE__].lastPathComponent
#define NSLog(...) printf("[类名:%s][第%d行]: %s\n\n", [LRString UTF8String], __LINE__, [NSString stringWithFormat:__VA_ARGS__] UTF8String);
#else
#define NSLog(...)
#endif

相关文章

网友评论

      本文标题:NSLog

      本文链接:https://www.haomeiwen.com/subject/yzgouttx.html