安装:pod 'CocoaLumberjack', '~> 2.0.0-beta'
使用方法:1. 在pch文件导入 #import"DDLog.h" 并且设置日志级别
#ifdef DEBUG
static const int ddLogLevel = LOG_LEVEL_VERBOSE;
#elif
static const int ddLogLevel = LOG_LEVEL_ERROR;
#endif
2.在didFinishLaunchingWithOptions方法里面添加
[DDLogaddLogger:[DDASLLoggersharedInstance]];
[DDLogaddLogger:[DDTTYLoggersharedInstance]];
3.在需要用的地方加,DDLogError(@"OKO");
OKOK了