I need to run a function after logFile has been rotated.
I don't see any way to do it in the code, so I implemented it myself.
There are two new callbacks:
AfterCompressFunc (filepath string)
BeforeDeleteFunc(filepath string) bool
First is async, second is blocking. BeforeDeleteFunc also can cancel file deleting by return FALSE, so it adds an ability to filter deleting files or do something before they will be deleted.
Both can be used to gracefully handle new log rotated, like:
Hello.
I need to run a function after logFile has been rotated. I don't see any way to do it in the code, so I implemented it myself.
There are two new callbacks: AfterCompressFunc (filepath string) BeforeDeleteFunc(filepath string) bool
First is async, second is blocking. BeforeDeleteFunc also can cancel file deleting by return FALSE, so it adds an ability to filter deleting files or do something before they will be deleted.
Both can be used to gracefully handle new log rotated, like: