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

feat: rotating client.log #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bigpick
Copy link

@bigpick bigpick commented Aug 6, 2024

Info

Closes hashtopolis/server#667

Switches the client log (client.log) to use a RotatingFileHandler instead of just a raw open file handle.

Adds two CLI arguments to adjust log rotation behavior, with sane defaults

  • --max-log-size
  • --max-log-backups

Suppose could make make it opt-in instead, if desired, and only use this new rotating option if --rotating-logger or somesuch was also passed. This way default functionality satisfies backwards compatibility such that not passing any new arguments would result in the client.log just growing indefinitely via the single raw open() handler (lmk if thats desired and can make that change)

Testing

I built a hashtopolis.zip agent bundle and synced it to our setup and configured to use it and nothing broke that I saw ¯_(ツ)_/¯. Log rotated as expected and kept specified number of backups.

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.

[FEATURE] Agent log rotation
1 participant