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

Daily rollover simply not work #198

Closed
yabee5566 opened this issue Jun 4, 2019 · 4 comments
Closed

Daily rollover simply not work #198

yabee5566 opened this issue Jun 4, 2019 · 4 comments

Comments

@yabee5566
Copy link

yabee5566 commented Jun 4, 2019

All daily rollover just simply don't work. It would rollover at other timing that is not on 00:00:00. I waste a lot of time here but failed.

@yabee5566 yabee5566 added the bug label Jun 4, 2019
@tony19
Copy link
Owner

tony19 commented Jun 5, 2019

The rollover would not automatically occur at midnight without a log event. This is documented in the notes here:

For rolling files, the file is rolled upon a log event past the rollover period (not automatically on time). This means that if no log events occur after 23 hours 59 minutes for a daily rollover period, the log file is not rolled over.

For example, if the app started at 11pm, and the next log event occurred at 2am, the log file would rollover at 2am. If you want the file to rollover at midnight, you'd have to log something at that time.

@tony19 tony19 closed this as completed Jun 5, 2019
@yabee5566
Copy link
Author

Sorry, I already did it and it just not work. I had tried TimeBasedRollingPolicy, SizeAndTimeBasedRollingPolicy. The rollover may happen in 8:00 or 10:00 something, just not at 00:00. The file for example, 2019-06-04.log would contains log in 2019-06-05.

@tony19
Copy link
Owner

tony19 commented Jun 5, 2019

Please provide reproduction steps, including the logback configuration (as prescribed in the bug report template).

@lock
Copy link

lock bot commented Jul 5, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the archived label Jul 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jul 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants