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

Implement log rotation #91

Merged
merged 29 commits into from
Jan 15, 2024
Merged

Implement log rotation #91

merged 29 commits into from
Jan 15, 2024

Conversation

norswap
Copy link
Member

@norswap norswap commented Jan 15, 2024

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)

    • The result of command-line args parsing has been moved out to a separate top-level 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 to lib.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.

@norswap norswap mentioned this pull request Jan 15, 2024
@norswap norswap merged commit 36bc7a5 into master Jan 15, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

Better log management
1 participant