码迷,mamicode.com
首页 > Web开发 > 详细

Xcode8 NSLog打印json不完整的解决方案

时间:2017-04-03 17:08:55      阅读:259      评论:0      收藏:0      [点我收藏+]

标签:print   str   utf8   err   debug   stp   line   json   efi   

解决方案:自定义宏,通过fprintf函数打印log,完美解决!

#ifdef DEBUG

#define NSLog(FORMAT, ...) fprintf(stderr, "%s:%zd\t%s\n", [[[NSString stringWithUTF8String: __FILE__] lastPathComponent] UTF8String], __LINE__, [[NSString stringWithFormat: FORMAT, ## __VA_ARGS__] UTF8String]);

#else

#define NSLog(FORMAT, ...) nil

#endif

 

Xcode8 NSLog打印json不完整的解决方案

标签:print   str   utf8   err   debug   stp   line   json   efi   

原文地址:http://www.cnblogs.com/tylerzhang/p/6662180.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!