Module: deluge Branch: multiuser Commit: 26e45dcbc8cf7d7a48a705decc543736dadd259c
Author: Pedro Algarvio <[email protected]> Date: Mon Dec 6 11:59:37 2010 +0000 Make use of `logging.handlers.WatchedFileHandler` if deluge is running on python 2.6. --- deluge/log.py | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/deluge/log.py b/deluge/log.py index 9ca094c..f488815 100644 --- a/deluge/log.py +++ b/deluge/log.py @@ -155,7 +155,9 @@ def setupLogger(level="error", filename=None, filemode="w"): delay=0 ) elif filename and filemode=='w': - handler = logging.FileHandler(filename, filemode, 'utf-8', delay=0) + getattr(logging.handlers, 'WatchedFileHandler', logging.FileHandler)( + filename, filemode, 'utf-8', delay=0 + ) else: handler = logging.StreamHandler() handler.setLevel(level) -- You received this message because you are subscribed to the Google Groups "deluge-commit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/deluge-commit?hl=en.
