Reputation: 35945
Is there a way to instruct FileLogTraceListener to delete old log files when it has no enough space on disk?
Cheers.
Upvotes: 2
Views: 794
Reputation: 4870
You should set the ReserveDiskSpace
Property to your preferred size and the DiskSpaceExhaustedBehavior
Property to ThrowException
.
Then add Try...Catch blocks around all code that writes to the log and delete logs when you catch that exception.
Upvotes: 2