[Mpuls-commits] r3105 - base/trunk

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


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

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


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-06-30 13:22:08 UTC (rev 3104)
+++ base/trunk/ChangeLog	2010-06-30 13:30:22 UTC (rev 3105)
@@ -1,3 +1,9 @@
+2010-06-30  Bernhard Herzog  <bh at intevation.de>
+
+	* development.ini: Add logging configuration for an optional
+	RotatingFileHandler and a comment describing how to activate it.
+	Ported from jmd/trunk.
+
 2010-06-29  Bernhard Herzog  <bh at intevation.de>
 
 	* mpulsweb/lib/renderer.py (ViewRenderer._renderRadio): Make it

Modified: base/trunk/development.ini
===================================================================
--- base/trunk/development.ini	2010-06-30 13:22:08 UTC (rev 3104)
+++ base/trunk/development.ini	2010-06-30 13:30:22 UTC (rev 3105)
@@ -85,13 +85,15 @@
 keys = root, mpulsweb
 
 [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]
@@ -105,6 +107,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