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

the rotationPeriod not enough to full fill hourly/daily rotation #133

Open
zhenchuan opened this issue Sep 22, 2014 · 2 comments
Open

the rotationPeriod not enough to full fill hourly/daily rotation #133

zhenchuan opened this issue Sep 22, 2014 · 2 comments

Comments

@zhenchuan
Copy link

if i want to rotate logs hourly, just using roatationPeriod will cause unnecessary messages in the log file,
eg. 19:57 + 10m (expected 20:00) .

how about if i add a force_rotate_ granularity property to support this ?

@metacret
Copy link
Contributor

So, you want to rotate files in every hour such as 10AM, 11AM, 12PM, ... even though you start the server on 9:30AM, did I understand correctly? If so, it makes sense.

Instead of force_rotate_granularity, if 'rotationPeriod' is hourly/daily/weekly/monthly, we can change the behavior.

nextRotation = new DateTime().plus(rotationPeriod).getMillis(); of LocalFileSink is the key of this behavior.

@zhenchuan
Copy link
Author

yes,you are right, but daily(even hourly) logs will be very big files,the rotationPeriod will also be useful .

This was referenced Oct 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants