Xcode8 控制台打印数据不全

最近升级Xcode8,开发工具出现了,控制台log数据不完整,经常打印一半,就没有了,经过查询一番终于找到了解决办法!

解决办法:宏定义去log日志数据,把NSlog换成print

1
2
3
4
5
6
7
8
9
#ifdef DEBUG

#define DLog( s, ... ) printf("class: <%p %s:(%d) > method: %s \n%s\n", self, [[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, __PRETTY_FUNCTION__, [[NSString stringWithFormat:(s), ##__VA_ARGS__] UTF8String] )

#else

#define DLog( s, ... )

#endif
文章目录
,