Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to view previous instance log files? #20

Open
mjanulaitis opened this issue Oct 3, 2017 · 1 comment
Open

How to view previous instance log files? #20

mjanulaitis opened this issue Oct 3, 2017 · 1 comment

Comments

@mjanulaitis
Copy link

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

@rivera-ernesto
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants