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

解决方案:自定义宏,通过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

 

posted @ 2017-04-03 16:11  tylerzhang  阅读(838)  评论(1编辑  收藏  举报