Skip to content

feat: rotating client.log - #48

Open
bigpick wants to merge 1 commit into
hashtopolis:masterfrom
bigpick:rotating-client-log
Open

feat: rotating client.log#48
bigpick wants to merge 1 commit into
hashtopolis:masterfrom
bigpick:rotating-client-log

Conversation

@bigpick

@bigpick bigpick commented Aug 6, 2024

Copy link
Copy Markdown

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.

@s3inlc

s3inlc commented Sep 2, 2026

Copy link
Copy Markdown
Member

Thanks for this PR, and sorry for the delay on reviewing this, we were busy a lot with the 1.0.0 of the backend.

It is not supposed that a PR itself increases to a new version (which is also the reason now that there are merge conflicts), could you maybe resolve these? Also, we plan to deprecate the changelog.md as it's redundant to the release notes and more annoying to manage (and keep conflict-free), so there is no need that it must be in there.

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

2 participants