在Xcode9.0上用了OS_ACTIVITY_MODE? disable加了過濾之后控制臺沒打印,可是通過下面的??宏完美解決。
/**
* ?完美解決Xcode NSLog打印不全的宏 親測目前支持到9.0版
*/
#ifdef DEBUG
//#define NSLog(format, ...) printf("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 NSLog(format, ...)
#endif