您的位置:首页 > 移动开发 > IOS开发

自定义ios NSLog

2016-08-15 14:41 288 查看
#ifdef DEBUG

#define MyLog(FORMAT, ...) fprintf(stderr,"Time:%s\t File:%s\t Methods:%s\t Line:%d\t Info:%s", __TIME__,[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String],__func__,__LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String])

#else

#define MyLog(FORMAT, ...) nil

#endif
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: