Skip to content

feat: preview log rotation - #28

Merged
HaoZeke merged 1 commit into
mainfrom
feat/rotate-dry-run
Nov 18, 2026
Merged

HaoZeke merged 1 commit into
mainfrom
feat/rotate-dry-run

Conversation

@HaoZeke

@HaoZeke HaoZeke commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

I added --dry-run to eb-keep-logs rotate in both the shell script and the Zig binary, rebased onto main after the Prometheus metrics support landed.

With --dry-run, rotate prints compress PATH for each .log or .txt file it would compress. It prints delete PATH for each run directory it would delete, then a summary line. It changes no files or directories. The dry run creates no rotation lock file and emits no syslog or journal event. Passing --metrics-file writes no metrics. Empty --metrics-file values are still refused with exit status 2.

The metrics file stays untouched on a dry run. I documented that interaction with --dry-run in the CLI reference, compatibility table, and rotation how-to guide. I added tests for --dry-run with --metrics-file in both tests/test_metrics.sh and tests/differential.sh, while keeping the existing default-path rotation and output-stability tests unchanged.

@HaoZeke
HaoZeke force-pushed the feat/rotate-dry-run branch from ede8a8e to 92ab83c Compare November 17, 2026 21:28
Rotate gained an opt-in dry-run mode in both the shell script and the Zig
binary. It lists the files that would be compressed and the runs that would
be deleted, without changing the tree, creating its lock file, emitting an
event, or writing metrics when a metrics file is given.
@HaoZeke
HaoZeke force-pushed the feat/rotate-dry-run branch from 92ab83c to 69563e9 Compare November 18, 2026 00:38
@HaoZeke
HaoZeke merged commit 825b388 into main Nov 18, 2026
8 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.

1 participant