打印运行的类名 和行数

#ifdef DEBUG
#define NSLog(FORMAT, ...) fprintf(stderr,"时间:%s 行号:%d 文件名:%s\t%s\n", __TIME__,__LINE__,[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String])
#else
#define NSLog(FORMAT, ...) nil
#endif

posted @ 2016-04-20 13:42  泡菜2015  阅读(162)  评论(0编辑  收藏  举报