NSLog打印不全解决办法

2019-10-06  本文已影响0人  加盐白咖啡
#ifdef DEBUG
#define NSLogEx(format, ...) printf("%f class: <%p %s:(%d) > method: %s \n%s\n", self, [[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, __PRETTY_FUNCTION__, [[NSString stringWithFormat:(format), ##__VA_ARGS__] UTF8String] )
#define NSLog(...) printf("%f %s\n",[[NSDate date]timeIntervalSince1970],[[NSString stringWithFormat:__VA_ARGS__]UTF8String]);
#else
#define NSLogEx(format, ...)
#define NSLog(...)
#endif

上一篇 下一篇

猜你喜欢

热点阅读