Log files. - Occuping excessive amounts of space

Woundering what every one does with log files. As if there are no issues with the site they never get refered to. But I have websites with in Exess ive 3G of files in them. Which is accounting for about 1/2 ifnot more of the total websites drive footprint.

Do you just at random times clean these out or is the a feature that only allows them to be kept for x number of days. (If not there needs to be). That brings to the next questing is there any other files that are created an never get used or have a limited life cycle that could be automaically cleaned up,

I use a Hangfire job which deletes logs older than X weeks, it runs once a day

Hi @DanielRogers-Intelli
There is a Serilog setting that can be used retainedFileCountLimit with the File Sink

The configuration for this is here in the docs

1 Like