ryapric / loggit

Modern Logging for the R Ecosystem
Other
37 stars 2 forks source link

Add rotate_lines to .config and rotate logs automatically #20

Open psolymos opened 2 years ago

psolymos commented 2 years ago

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:

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.

ryapric commented 2 years ago

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!