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

log to file, log rotation #139

Open
dezren39 opened this issue Aug 8, 2024 · 0 comments
Open

log to file, log rotation #139

dezren39 opened this issue Aug 8, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@dezren39
Copy link
Contributor

dezren39 commented Aug 8, 2024

Is your feature request related to a problem? Please describe.
I'd love if there was a built-in logfiles and log-rotation feature of some kind, perhaps like lumberjack, perhaps with a few other nice features. I mostly just rely on journalctl and stdout, but in a variety of situations it would be nice to put logs straight to files. perhaps pretty logs in stdout and json logs to a file, etc.

Describe the solution you'd like
Rotate based on age, size, number of backups. Allow backup files to put timestamps before or after extension or at the front. Allow hyphens or underscores or dots to separate timestamps. Allow backups to go to a different dir than main log file. Allow compressing backup logs.

Describe alternatives you've considered
Lumberjack is a good alternative. Maybe there is a slog rotator that could be used with the slog adapter for charmbracelet/log

@dezren39 dezren39 added the enhancement New feature or request label Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant