ddfilelogger

iOS CocoaLumberjack: New log file is creating on every time app launch, if backgroundModes enabled and app running in simulator

安稳与你 提交于 2020-01-06 08:59:48
问题 I have configured library like below let fileLogger: DDFileLogger = DDFileLogger() fileLogger.rollingFrequency = -1 fileLogger.maximumFileSize = 1024 * 1024 fileLogger.logFileManager.maximumNumberOfLogFiles = 7 DDLog.add(fileLogger) File has to roll only if it reaches 1MB size. Recently i observed one thing, if app running in simulator with background mode enabled. New log file is creating on every time app launch irrespective of file size. Is this known thing?. Because NSFileProtectionType

Where is Logfile stored using cocoaLumberjack

怎甘沉沦 提交于 2019-12-13 11:34:36
问题 I am Using cocoaLumberjack logging framework for iOS logging. For storing logs in a file I used this code. DDFileLogger* fileLogger = [[DDFileLogger alloc] init]; fileLogger.rollingFrequency = 60 * 60 * 24; fileLogger.logFileManager.maximumNumberOfLogFiles = 7; [DDLog addLogger:fileLogger]; DDLogVerbose(@"hello"); NSLog(@"hihihihihi"); I am unable to find where exactly the logfile generated by this code is stored. Can someone help me with this problem ? 回答1: You can download the log files