-
Notifications
You must be signed in to change notification settings - Fork 27
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
Implement log rotation #91
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…handle moves and truncation in turn, these things might occur due to the user setting some logrotate overrides
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #46
Implement log rotation, with a default policy of retaining 300 rotation of 3MB or 14 days (files deleted whenever the first one happens) — users can configure this via options and also add overrides (in the form of logrotate commands) per-log-file
Move
libroll
to own package and split a few things out (more work to do there to get a real clean layout)state
module.Fix "failed to promptly kill subprocess" and generally improve the shutdown logic
Now warn whenever a service shuts down unintendly — in the future we can implement a restart logic.
Migrate more log files to the config. Right now the system is that log files name that need to be rotated live in the config, while others are hardcoded, but ultimately it would be good to migrate them too.
Add new
file=
mode tolib.run
and derivatives — this is not only terser (no more need to open the file ourselves) but it writes by reopening the file every time a write is made. This is necessary for handling archiving of log files via move (not necessary in the default config because log files are compressed by default).Really fixed the flaky deployment to temporary geth issue this time — see here for a description.