mtkennerly / shawl

Windows service wrapper for arbitrary commands
MIT License
448 stars 15 forks source link

Configuring a different max log size and rotated log file retention #41

Closed lachlan closed 7 months ago

lachlan commented 7 months ago

@mtkennerly Thank you so much for building shawl! I was previously trying to use nssm and despite its name I found it rather sucky. On the other hand shawl is working perfectly for me so far 💯

The project I am using shawl for writes a lot of logs, like easily 100-200Mb per day, and I would like to keep a rolling fortnight or months' worth if possible. As an aside, I see that flexi_logger also supports age based rotation, so my ideal scenario would be to configure shawl to rotate files every day and retain 14 or 32 files.

Would it be possible to expose the logging configuration (size or age for rotation, and number of rotated files retained) as CLI arguments to shawl so that we can customize/tailor the logging to suit the executable/command being wrapped?

mtkennerly commented 7 months ago

Thanks for the suggestion :) In the next version, you'll be able to do this with --log-rotate daily --log-retain 30.

lachlan commented 7 months ago

Thank you!