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];

}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2022-02-18
  • 2021-09-22
  • 2022-12-23
猜你喜欢
  • 2021-10-13
  • 2021-06-03
  • 2021-06-22
  • 2021-11-26
  • 2022-12-23
  • 2021-12-21
相关资源
相似解决方案