[Checkins] SVN: grokproject/trunk/grokproject/template_paste/etc/ add wsgi access logging

Michael Haubenwallner michael at d2m.at
Sun Mar 15 08:50:54 EDT 2009


Log message for revision 98120:
  add wsgi access logging
  remove wsgi exception logging to STDOUT
  

Changed:
  U   grokproject/trunk/grokproject/template_paste/etc/debug.ini.in_tmpl
  U   grokproject/trunk/grokproject/template_paste/etc/deploy.ini.in_tmpl
  U   grokproject/trunk/grokproject/template_paste/etc/zope.conf.in_tmpl

-=-
Modified: grokproject/trunk/grokproject/template_paste/etc/debug.ini.in_tmpl
===================================================================
--- grokproject/trunk/grokproject/template_paste/etc/debug.ini.in_tmpl	2009-03-15 11:39:12 UTC (rev 98119)
+++ grokproject/trunk/grokproject/template_paste/etc/debug.ini.in_tmpl	2009-03-15 12:50:53 UTC (rev 98120)
@@ -1,3 +1,47 @@
+# $${buildout:directory}/parts/log/
+
+[loggers]
+keys = root, wsgi
+
+[handlers]
+keys = console, accesslog
+
+[formatters]
+keys = generic, accesslog
+
+[formatter_generic]
+format = %(asctime)s %(levelname)s [%(name)s] %(message)s
+
+[formatter_accesslog]
+format = %(message)s
+
+[handler_console]
+class = StreamHandler
+args = (sys.stderr,)
+level = NOTSET
+formatter = generic
+
+[handler_accesslog]
+class = FileHandler
+args = ('$${buildout:directory}/parts/log/access.log','a')
+level = INFO
+formatter = accesslog
+
+[logger_root]
+level = INFO
+handlers = console
+
+[logger_wsgi]
+level = INFO
+handlers = accesslog
+qualname = wsgi
+propagate = 0
+
+[filter:translogger]
+use = egg:Paste#translogger
+setup_console_handler = False
+logger_name = wsgi
+
 [filter-app:main]
 # Change the last part from 'ajax' to 'pdb' for a post-mortem debugger
 # on the console:
@@ -6,6 +50,7 @@
 
 [app:zope]
 use = egg:${egg}
+filter-with = translogger
 
 [server:main]
 use = egg:Paste#http
@@ -14,4 +59,4 @@
 
 [DEFAULT]
 # set the name of the zope.conf file
-zope_conf = %(here)s/zope.conf
+zope_conf = %(here)s/zope.conf
\ No newline at end of file

Modified: grokproject/trunk/grokproject/template_paste/etc/deploy.ini.in_tmpl
===================================================================
--- grokproject/trunk/grokproject/template_paste/etc/deploy.ini.in_tmpl	2009-03-15 11:39:12 UTC (rev 98119)
+++ grokproject/trunk/grokproject/template_paste/etc/deploy.ini.in_tmpl	2009-03-15 12:50:53 UTC (rev 98120)
@@ -1,5 +1,50 @@
+# $${buildout:directory}/parts/log/
+
+[loggers]
+keys = root, wsgi
+
+[handlers]
+keys = console, accesslog
+
+[formatters]
+keys = generic, accesslog
+
+[logger_root]
+level = INFO
+handlers = console
+
+[logger_wsgi]
+level = INFO
+handlers = accesslog
+qualname = wsgi
+propagate = 0
+
+[handler_console]
+class = StreamHandler
+args = (sys.stderr,)
+level = NOTSET
+formatter = generic
+
+[handler_accesslog]
+class = FileHandler
+args = ('$${buildout:directory}/parts/log/access.log','a')
+level = INFO
+formatter = accesslog
+
+[formatter_generic]
+format = %(asctime)s %(levelname)s [%(name)s] %(message)s
+
+[formatter_accesslog]
+format = %(message)s
+
+[filter:translogger]
+use = egg:Paste#translogger
+setup_console_handler = False
+logger_name = wsgi
+
 [app:main]
 use = egg:${egg}
+filter-with = translogger
 
 [server:main]
 use = egg:Paste#http

Modified: grokproject/trunk/grokproject/template_paste/etc/zope.conf.in_tmpl
===================================================================
--- grokproject/trunk/grokproject/template_paste/etc/zope.conf.in_tmpl	2009-03-15 11:39:12 UTC (rev 98119)
+++ grokproject/trunk/grokproject/template_paste/etc/zope.conf.in_tmpl	2009-03-15 12:50:53 UTC (rev 98120)
@@ -19,8 +19,8 @@
 </zodb>
 
 <eventlog>
-  # This sets up logging to both a file and to standard output
-  # (STDOUT).  The "path" setting can be a relative or absolute
+  # This sets up logging to a file.
+  # The "path" setting can be a relative or absolute
   # filesystem path or the tokens STDOUT or STDERR.
 
   <logfile>
@@ -28,10 +28,12 @@
     formatter zope.exceptions.log.Formatter
   </logfile>
 
-  <logfile>
-    path STDOUT
-    formatter zope.exceptions.log.Formatter
-  </logfile>
+  # This sets up logging to to standard output (STDOUT).
+
+#  <logfile>
+#    path STDOUT
+#    formatter zope.exceptions.log.Formatter
+#  </logfile>
 </eventlog>
 
 # Comment this line to disable developer mode.  This should be done in



More information about the Checkins mailing list