Skip to content

feat(logs): configurable request-log retention (from #336) - #386

Merged
caigee-cmd merged 1 commit into
mainfrom
fix/pr-336-log-retention
Oct 24, 2026
Merged

caigee-cmd merged 1 commit into
mainfrom
fix/pr-336-log-retention

Conversation

@caigee-cmd

Copy link
Copy Markdown
Owner

Summary

Extracts configurable request-log retention from external PR #336.

  • CLI2API_LOG_RETENTION_DAYS (default 7) and CLI2API_LOG_MAX_ROWS (default 20000)
  • Invalid values fall back so a typo cannot disable pruning
  • deploy/docker-compose.yml documents the env vars under environment

Test plan

  • go test ./internal/logs/ (retention_test.go)
  • Confirm docker-compose env keys land under environment, not volumes

Supersedes the retention portion of #336. Do not merge #336 as-is.

Extract CLI2API_LOG_RETENTION_DAYS / CLI2API_LOG_MAX_ROWS from #336 as a
standalone change. Defaults stay 7 days / 20k rows; invalid values fall
back so a typo cannot disable pruning.
@caigee-cmd
caigee-cmd merged commit 1943af1 into main Oct 24, 2026
6 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