-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Issue in Rolling Frequency. #243
Comments
Rolling broken for me too. |
Are you using the latest master version? ( Any idea @dvor ? |
I am having the same issue with setting the maxim file size and I just now updated to the latest version. Here's my code: fileLogger = [[DDFileLogger alloc] init]; I want the log files capped at 512K, but when I look at the files using iExplorer, the files just keep getting appended to and grow without limit. As you can see, I used to have this set for 24 hour rolling, but the logs were getting way too big. We upload them to our server if there is an issue and we don't want them to be huge. |
I also wanted to add that the method to roll the file log is not working: [fileLogger rollLogFileWithCompletionBlock:^{ |
I'm seeing the same thing -- new log messages being written to the latest log file even if it's beyond the rolling frequency age limit. From what I can tell, the issue is that DDFileLogger rollLogFileNow sets currentLogFileInfo.isArchived=YES (which is reasonable), but then the next time currentLogFileInfo gets called, we find that mostRecentLogFileInfo.isArchived is true, so we set shouldArchiveMostRecent=NO, and then fall into this code path:
I've hacked this conditional in my own project to add a check for !mostRecentLogFileInfo.isArchived, and now I believe it's working as expected. However I am very new to CocoaLumberjack so I don't know if this may have any unintended side effects. Hopefully someone who's more familiar with the code can investigate my findings and decide whether this is a legitimate solution. |
Could you make a pull request so we can discuss the changes there? |
Also broken for me. Git bisect running against RollingTestMac suggested SHA bb167eb |
Same issue here. Huge log files. |
I am also experiencing this behavior. It appears, empirically, that as the logs file grows the overall performance of CocoaLumberjack, and my application, declines in a notable way. Is this causal or expected? |
Guys, could you please check this using the latest master? I've merged the pull request from @georgekola and want to make sure this fixes the rolling issue you are having. |
This seems to work correctly now for me (I tested against RollingTestMac). Thank you to @georgekola for the fix. |
I've checked - everything is working. |
I'm still having this issue. let fileLogger: DDFileLogger = DDFileLogger() // File Logger #if DEBUG |
I have integrated the framework and followed the very same steps that was provided in the gitHub home page. i wrote the code as follows:
DDFileLogger _fileLogger = [[DDFileLogger alloc] init];
[fileLogger setRollingFrequency:60_60];
[fileLogger.logFileManager setMaximumNumberOfLogFiles:7];
[fileLogger setMaximumFileSize:3145728];
[DDLog addLogger:fileLogger];
[DDLog addLogger:[DDTTYLogger sharedInstance]];
But the rolling feature doesnt seems to be working. It is still appending logs to the same file even after it crossed an hour's time.
DDLogVerbose(@"%@",[fileLogger.logFileManager logsDirectory]);
The text was updated successfully, but these errors were encountered: