lumberjack icon indicating copy to clipboard operation
lumberjack copied to clipboard

Add pre & post rotate actions.

Open ecw19 opened this issue 8 years ago • 2 comments

Sometimes we need to perform certain actions before or after logger rotation. It would be very useful if we can have these functions in.

ecw19 avatar Jun 14 '17 21:06 ecw19

Do you have an example of what you'd like to do before or after a rotation? I'm a little wary of letting people define arbitrary functions for these actions, because this happens inside the time of a log writing, so if you do something that takes a long time, the time to log a single line could be very long.

natefinch avatar Jun 28 '17 15:06 natefinch

I work with @ecw19 on the same project. I am not sure why we added PreRotateAction, as we don't appear to be using it. Perhaps just for completeness?

We use the PostRotateAction to upload logs to our analytics service.

swt2c avatar Jul 25 '17 18:07 swt2c