-
Notifications
You must be signed in to change notification settings - Fork 456
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
Add custom log rotator option and hourly log rotation #420
Conversation
Thanks for the PR. We will review this during our normal triage session, Oct 19. |
Thanks for your patience! This is great work. Thank you for the PR! We like this patch and would like to merge it, but first we would like to see more documentation for the features being added here:
Thanks again. Lookjng forward to getting this into the project. |
@mrallen1 Thanks for taking a look on this |
Sorry to do this, but would you mind rebasing this PR? If you can get to it, I'll merge it. Thank you. |
Sure I will do this later this week.
2018年1月1日(月) 12:21 Mark Allen <[email protected]>:
Sorry to do this, but would you mind rebasing this PR? If you can get to
it, I'll merge it. Thank you.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#420 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAWBtKgA09EHWuqNmLZCI28uLi6PsMo9ks5tGE8-gaJpZM4P2axS>
.
--
Wishes,
Wilson
|
If you're willing to refactor the rotator into its own module (get it out of util now it is pluggable), that'd be great too. Otherwise we can do it after this merges. |
No problem I will do it tomorrow
2018年1月2日(火) 6:22 Andrew Thompson <[email protected]>:
If you're willing to refactor the rotator into its own module (get it out
of util now it is pluggable), that'd be great too. Otherwise we can do it
after this merges.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#420 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAWBtGbTIbt0pcpZ7qZywdXywnz7Js6Fks5tGUyDgaJpZM4P2axS>
.
--
Wishes,
Wilson
|
6027aac
to
12171e1
Compare
@mrallen1 @Vagabond I have rebased the PR and refactored the rotator into a separate module. While the code passed the unit test from my environment with OTP 18.3, it fails in Travis with
Do you have any clues what do these errors mean? |
It's a race condition, not sure why it hits 18.3 so consistently, it is not a concern. |
README.md
Outdated
------------------- | ||
Custom log rotator could be configured with option for `lager_file_backend` | ||
```erlang | ||
{rotator, lager_util} |
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.
This needs to change, right?
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.
oops, sorry for that, let me fix it. Rebase later
Looking at this now, what would a custom rotator look like, given it seems to mainly just handle file operations, not the decision around when to rotate. |
Just want to say "thank you!" for rebasing and pulling all of the changes into their own module. |
@Vagabond To us, we want to change how the log files are named. |
OK, this is a good start. Ultimately, I think we want all the rotation logic to be encapsulated inside a module/behaviour. So I am going to merge this and open an issue to migrate the rotation decision making inside the same module/behaviour. |
I am seeking to use
lager
as the logging back-end for LeoFS, so would like to open up the possibility of custom log rotator.This should not change the current behaviour, only when user opt-in with custom log rotator