LumberjackConsole icon indicating copy to clipboard operation
LumberjackConsole copied to clipboard

How to view previous instance log files?

Open mjanulaitis opened this issue 8 years ago • 1 comments

When the console displays, I would like to see the previous log file and even better the previous 7 days of logs. I have configured as follows but I do not see the log contents or a way to select a previous log file:

[PTEDashboard.sharedDashboard show]; [DDLog addLogger:[DDTTYLogger sharedInstance]]; DDFileLogger *fileLogger = [[DDFileLogger alloc] init]; // File Logger fileLogger.rollingFrequency = 60 * 60 * 24; // 24 hour rolling fileLogger.logFileManager.maximumNumberOfLogFiles = 7; [DDLog addLogger:fileLogger]; NSDictionary *infoDict = [[NSBundle mainBundle] infoDictionary]; NSString *appVersion = [infoDict objectForKey:@"CFBundleShortVersionString"]; NSString *buildNumber = [infoDict objectForKey:@"CFBundleVersion"]; DDLogInfo(@"Starting %@ (%@)...", appVersion, buildNumber);

mjanulaitis avatar Oct 03 '17 18:10 mjanulaitis

The console is just another logger. It is an output for logs just like Xcode's console or the file logger. It doesn't read log files but receives messages directly from CocoaLumberjack.

To implement what you want you would need to "import" log messages from the file at startup.

rivera-ernesto avatar Oct 03 '17 18:10 rivera-ernesto