iOS NSlog打印数据不完全,xcode处理办法

#ifdef DEBUG //调试

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

#else // 发布

#define NSLog(FORMAT, ...) nil

#endif

在项目中的.pch文件中添加可全局使用。

原文地址:https://www.cnblogs.com/gaozhang12345/p/11281592.html