自定义NSLog
2015-10-30 15:12
113 查看
1、
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__)
#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 格式
- 第三方库CocoaLumberjack的简单使用
- 创建SDK时NSLog的解决办法
- OC中NSLog输出格式
- iOS - NSLog的使用方法
- 如何NSLog Integer类型,帮你消除warning
- nslog格式转换
- 可变参数函数写法
- OC 日志打印
- C与OC
- iOS NSLog输出
- NSLog输出格式
- iOS开发之使用代码定位性更高的Log
- NSLog的格式
- Objective-c——NSLog
- iOS Development: You're Doing It Wrong
- NSLog替换的演变
- 【ios自学笔记】OC中log信息的输出方法,包含import、字符串、输出日志等知识点
- 【OC语言基础】之布尔类型的使用
- 【OC语言基础】之面向对象开发(类和对象)