elvishew/xLog

Why the cleanStrategy doesn't work?

Closed this issue · 2 comments

I have added a cleanStrategy in filePrinter.
:cleanStrategy(new FileLastModifiedCleanStrategy(30000))
I want to clean the file after 30 seconds, but it doesn't work.

@SunZhiyuanS FileLastModifiedCleanStrategy doesn't relay on the created time, but the last modified time.
If you want to delete the file after 30 seconds since it is created, you can implement your own clean strategy, something like FileCreatedCleanStrategy

@elvishew Thanks,I will try it later.