loggit
loggit copied to clipboard
Add rotate_lines to .config and rotate logs automatically
Thanks for the great tool. As far as I can see in the source code, the log files are not automatically rotated. I would suggest the following implementation:
- add a
rotate_lines=NULLentry to the.configenvironment - have functions to
set_rotate_linesandget_rotate_lines loggitcan check if.config$rotate_linesis set, and if it is set to non-NULL, rotate the logs
This would leave the implementation backwards compatible, but would allow using {loggit} in long running sessions where rotate_lines limit is likely to be exceeded, e.g. Plumber APIs etc.
I am happy to work on a PR if this is something you can see as a useful contribution.
Yep, no auto-rotate is implemented so loggit can be as efficient as possible. #21's implementation is a nice idea though, taking my comments there!