您的位置:首页 > 其它

自定义NSLog

2015-10-30 15:12 113 查看
1、

#define  MYNSLog(...)  NSLog(__VA_ARGS__)

2、

#define MYONELog(formatStr, ...) fprintf(stderr,"file:%s line:%d func:%s %s\n",[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__,__func__, [[NSString stringWithFormat:formatStr, ##__VA_ARGS__] UTF8String]);


3、
#define MYTWOLog(formatString,...) NSLog(@"file:%@ func:%s line:%d "formatString, [[NSString stringWithUTF8String:__FILE__] lastPathComponent] , __func__, __LINE__, ##__VA_ARGS__)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  自定义NSLog NSLog