[Mpuls-commits] r3104 - jmd/trunk

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Jun 30 15:22:13 CEST 2010


Author: bh
Date: 2010-06-30 15:22:08 +0200 (Wed, 30 Jun 2010)
New Revision: 3104

Modified:
   jmd/trunk/ChangeLog
   jmd/trunk/development-combined.ini
Log:
* development-combined.ini: Add logging configuration for an
optional RotatingFileHandler and a comment describing how to
activate it.


Modified: jmd/trunk/ChangeLog
===================================================================
--- jmd/trunk/ChangeLog	2010-06-30 09:33:40 UTC (rev 3103)
+++ jmd/trunk/ChangeLog	2010-06-30 13:22:08 UTC (rev 3104)
@@ -1,3 +1,9 @@
+2010-06-30  Bernhard Herzog  <bh at intevation.de>
+
+	* development-combined.ini: Add logging configuration for an
+	optional RotatingFileHandler and a comment describing how to
+	activate it.
+
 2010-06-24  Bernhard Herzog  <bh at intevation.de>
 
 	* development-combined.ini: Move the cache_dir setting to the

Modified: jmd/trunk/development-combined.ini
===================================================================
--- jmd/trunk/development-combined.ini	2010-06-30 09:33:40 UTC (rev 3103)
+++ jmd/trunk/development-combined.ini	2010-06-30 13:22:08 UTC (rev 3104)
@@ -199,13 +199,15 @@
 keys = root, mpulsweb, jmdweb, jmdstrukturweb
 
 [handlers]
-keys = console
+keys = console, file
 
 [formatters]
 keys = generic
 
 [logger_root]
 level = INFO
+# add ", file" to handlers to activate logging into the file configured
+# in the handler_file section
 handlers = console
 
 [logger_mpulsweb]
@@ -230,6 +232,15 @@
 level = NOTSET
 formatter = generic
 
+[handler_file]
+class = logging.handlers.RotatingFileHandler
+# Third parameter in args is maximum size of the log file in bytes.
+# Fourth parameter specifies the number of old files to keep.
+args=('mpuls.log', 'w', 1048576, 5)
+level = NOTSET
+formatter = generic
+
+
 [formatter_generic]
 format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
 datefmt = %H:%M:%S



More information about the Mpuls-commits mailing list