CocoaLumberjack 踩坑
2016-10-24 09:39
232 查看
最近想要导入CocoaLumberjack Log第三方库,来给调试或者以后用户特例问题定位”加点颜色”。
cocoa pod导入这个库。
按照网上的教程添加上去,
但是遇到2个问题
1. 设置log的format
2. 没有设置log的level
pch中加入
AppDelegate中添加以下代码
然后就可以开始测试了
参考资料
http://blog.csdn.net/lmyuanhang/article/details/50549553
https://github.com/robbiehanson/XcodeColors
cocoa pod导入这个库。
按照网上的教程添加上去,
但是遇到2个问题
1. 设置log的format
2. 没有设置log的level
format。。。
至今不知道怎么设置。。Use of undeclared identifier ddloglevel
解决方法pch中加入
#import <CocoaLumberjack/CocoaLumberjack.h> #import "DDLog.h" #ifdef DEBUG static const int ddLogLevel = LOG_LEVEL_VERBOSE; #else static const int ddLogLevel = LOG_LEVEL_WARN; #endif
AppDelegate中添加以下代码
[DDLog addLogger:[DDTTYLogger sharedInstance]];
然后就可以开始测试了
NSLog(@"configLOG"); DDLogInfo(@"DDLogInfo"); DDLogWarn(@"warn"); DDLogVerbose(@"verbose"); DDLogError(@"error");
参考资料
http://blog.csdn.net/lmyuanhang/article/details/50549553
https://github.com/robbiehanson/XcodeColors
相关文章推荐
- CocoaLumberjack 学习总结(五)
- DDLog--CocoaLumberjack framework 自定义日志管理
- iOS 获取日志框架CocoaLumberjack
- CocoaLumberjack使用案例
- iOS开源项目之日志框架CocoaLumberjack
- 使用CocoaLumberjack的一些问题记录
- CocoaLumberjack框架简单介绍
- NSLog-----CocoaLumberjack
- cocoapod导入文件错误- `CocoaLumberjack (~> 2.0.0-rc2)` required by `Podfile`
- CocoaLumberjack
- IOS开发小技巧——强大的企业级调试日志——IOS第三方库CocoaLumberjack/CocoaLumberjack(1)
- CocoaLumberjack 学习纪录(五)
- Log---CocoaLumberjack
- IOS小知识点6之条件编译、Log系统、重命名、CocoaLumberjack、NSLogger、函数调用堆栈
- CocoaLumberjack的使用
- CocoaLumberjack 学习纪录(六)
- CocoaLumberjack(DDLog)分文件存储日志
- CocoaLumberjack framework 自定义日志管理
- CocoaLumberjack的ios应用开发使用指南
- CocoaLumberjack 学习纪录(七)