完美解决Xcode8.0之后版本NSLog打印输出不全

    xiaoxiao2021-12-14  31

    /** * 完美解决Xcode NSLog打印不全的宏 亲测目前支持到8.2bate版 */ #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

     

    转载请注明原文地址: https://ju.6miu.com/read-962835.html

    最新回复(0)