打印运行的类名 和行数

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

原文地址:https://www.cnblogs.com/paocai2015/p/5412317.html