changeset 2205:cfc1595e53dc

cfg.traceback_show (show tracebacks on the web) and cfg.traceback_log_dir (directory to dump tracebacks to - ported from 1.5 repo)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 14 May 2007 21:43:28 +0200
parents 6a37ecdd79d5
children b9fa45f5c47f
files MoinMoin/config/multiconfig.py MoinMoin/failure.py
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/config/multiconfig.py	Mon May 14 21:39:52 2007 +0200
+++ b/MoinMoin/config/multiconfig.py	Mon May 14 21:43:28 2007 +0200
@@ -468,6 +468,9 @@
     theme_default = 'modern'
     theme_force = False
 
+    traceback_show = 1
+    traceback_log_dir = None
+
     trail_size = 5
     tz_offset = 0.0 # default time zone offset in hours from UTC
 
--- a/MoinMoin/failure.py	Mon May 14 21:39:52 2007 +0200
+++ b/MoinMoin/failure.py	Mon May 14 21:43:28 2007 +0200
@@ -143,7 +143,10 @@
     logging.error('%s: %s' % (err.__class__.__name__, str(err)), exc_info=savedError)
     try:
         debug = 'debug' in getattr(request, 'form', {})
-        handler = cgitb.Hook(file=request, viewClass=View, debug=debug)
+        handler = cgitb.Hook(file=request,
+                             display=request.cfg.traceback_show,
+                             logdir=request.cfg.traceback_log_dir,
+                             viewClass=View, debug=debug)
         handler.handle()
     except:
         request.write('<pre>\n')