Skip to content

Add log rotation for prism-hooks.log#15

Merged
himattm merged 1 commit intomainfrom
mmckenna/log-rotation
Feb 11, 2026
Merged

Add log rotation for prism-hooks.log#15
himattm merged 1 commit intomainfrom
mmckenna/log-rotation

Conversation

@himattm
Copy link
Owner

@himattm himattm commented Feb 11, 2026

Summary

The prism-hooks.log file had no size limits and grew to 979MB on one machine, consuming significant disk space with no rotation or cleanup.

This adds simple log rotation: before each write, if the log exceeds 10MB, it is renamed to prism-hooks.log.old (replacing any previous backup), and a fresh log is started. This caps disk usage at ~20MB (current + one rotated backup).

Changes

  • Rotate prism-hooks.log at 10MB, keeping one .old backup
  • Rotation happens inline before each log write, no external dependencies

Test plan

  • Verified go build and go vet pass
  • Manually confirm rotation triggers when log exceeds 10MB

🤖 Generated with Claude Code

Rotates the log file at 10MB, keeping one .old backup. This prevents
the hook log from consuming excessive disk space over time.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@himattm himattm merged commit c4ac735 into main Feb 11, 2026
1 check 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.

1 participant