关闭

[置顶] CocoaLumberjack

274人阅读 评论(0) 收藏 举报
分类:

http://www.cocoachina.com/industry/20140414/8157.html

http://www.cocoachina.com/ios/20150311/11300.html

static constint ddLogLevel =DDLogLevelWarning;


-(void)setUpLumberJack

{

    NSArray  *paths =NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);

    NSString *docPath = [[pathslastObject]stringByAppendingString:@"/Logs"];

    DDLogFileManagerDefault* fileManager = [[DDLogFileManagerDefaultalloc]initWithLogsDirectory:docPathdefaultFileProtectionLevel:NSFileProtectionNone];

    DDFileLogger* fileLogger = [[DDFileLoggeralloc]initWithLogFileManager:fileManager];

    

    [DDLogaddLogger:[DDASLLoggersharedInstance]];

    [DDLogaddLogger:[DDTTYLoggersharedInstance]];

    [DDLogaddLogger:fileLogger];

}


0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:15749次
    • 积分:445
    • 等级:
    • 排名:千里之外
    • 原创:29篇
    • 转载:2篇
    • 译文:1篇
    • 评论:0条
    博客专栏
    文章分类