This allows...
Content-type: text/plain

Author: johnnyg

Revision: 5274

Log:
        Added filemode support to setupLogger.
This allows log files to be appended to if desired.

Diff:
Modified: trunk/deluge/log.py
===================================================================
--- trunk/deluge/log.py 2009-05-17 12:19:14 UTC (rev 5273)
+++ trunk/deluge/log.py 2009-05-17 12:28:03 UTC (rev 5274)
@@ -34,7 +34,7 @@
     "none": logging.CRITICAL,
     "debug": logging.DEBUG
 }
-def setupLogger(level="error", filename=None):
+def setupLogger(level="error", filename=None, filemode="w"):
     """
     Sets up the basic logger and if `:param:filename` is set, then it will log
     to that file instead of stdout.
@@ -51,7 +51,7 @@
         format="[%(levelname)-8s] %(asctime)s %(module)s:%(lineno)d 
%(message)s",
         datefmt="%H:%M:%S",
         filename=filename,
-        filemode="w"
+        filemode=filemode
     )
 
 def setLoggerLevel(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
-~----------~----~----~----~------~----~------~--~---

Reply via email to