csharpier icon indicating copy to clipboard operation
csharpier copied to clipboard

CSharpier Server - should have some form of log cleanup.

Open belav opened this issue 1 year ago • 3 comments

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.

belav avatar Aug 22 '24 02:08 belav

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

stefannikolei avatar Sep 16 '24 16:09 stefannikolei

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.

belav avatar Sep 17 '24 00:09 belav

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?

stefannikolei avatar Sep 17 '24 13:09 stefannikolei