belav / csharpier

CSharpier is an opinionated code formatter for c#.
https://csharpier.com
MIT License
1.41k stars 98 forks source link

CSharpier Server - should have some form of log cleanup. #1330

Open belav opened 3 months ago

belav commented 3 months ago

Right now csharpier server appends logs to server*.log files without limits or cleanup. Perhaps on startup it should clean up any file that hasn't been touched in x days.

stefannikolei commented 2 months ago

Would you be ok with adding Serilog? There would be an auto cleanup for "free"

belav commented 2 months ago

Would you be ok with adding Serilog? There would be an auto cleanup for "free"

I looked at it originally but settled on that lightweight logger instead. I don't recall the exact reason. I think it was either - Serilog bloated the size of the tool install and was way more than what was needed. Or getting serilog working was less straightforward. I'm not opposed to pulling it in assuming it doesn't bloat the tool install too much.

stefannikolei commented 2 months ago

Ok. I looked further into it. For me it looks like there's already a cleanup configured. The logFile will automatically role over after reaching 10mb and overwrite this file. Perhaps we can lower the file size and instead use more rolling files?

Am I wrong on this?