-
Notifications
You must be signed in to change notification settings - Fork 725
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
feat: custom log rotation duration #3135
base: master
Are you sure you want to change the base?
Conversation
d7850e3
to
3428332
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think that the constant intervals (minutely, hourly, etc.) should be wrappers around this new custom interval?
I'm wondering if it would simplify other functions like next_date
and date_format
, particularly the match
statements.
When I initially implemented this that thought never came to mind. I think this is a great idea! I think it should be possible to do without a breaking change as well. The time crate has constant durations for the intervals we'd want. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM The refactoring that I mentioned in my previous review could be done in a separate PR.
@hawkw it looks like @zekisherif doesn't have write access to the repository and he's the code owner for these files. May you take a pass at this PR or recommend another individual for review?
I have some minutes to spare this morning, can take a look at it right now if that's ok 😊 |
dab7b5d
to
b532c42
Compare
`Rotation` is instead a newtype around `Option<time::Duration>`.
b532c42
to
76dd19c
Compare
This PR attempts to get #2654 past the finish line, as it seems to have gone stale. I'll refrain from repeating its motivation and solution sections if that's ok.
Closes: #778,#2654
Version control:
Changes:
Rotation::custom
usesstd::time::Duration
. This removes the need for users to pull in the time library, whilst simultaneously ensuring that the duration is always positive.Improvements:
rolling::custom()
constructor forRollingFileAppender