logging - python rotating file handler callback -


i'm using rotatingfilehandler (https://docs.python.org/2/library/logging.handlers.html) in python log messages - there anyway function callback when rotatingfilehandler switches new file?

for example, i'm logging messages, , when file rotates want process of messages using defined function

thanks!

there's not callback, can subclass rotatingfilehandler , override own "rotation", implementing dorollover method:

myfilehandler(rotatingfilehandler):      def dorollover():         # invoke superclass' actual rotation implementation         super(myfilehandler, self).dorollover()          # start doing own tasks         # ... 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -