Dbug NSLog

#ifdef DEBUG
#define NSLog(FORMAT, ...) fprintf(stderr,"文件名:%s 行数:%d 输出:%s\n",[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String])
#else
#define NSLog(...)
#endif

你可能感兴趣的:(Dbug NSLog)