From beac3eee9ed01229f5184744f0679de8d699c789 Mon Sep 17 00:00:00 2001 From: ianb Date: Tue, 26 Jul 2005 18:16:21 +0000 Subject: Changed default for show_exceptions_in_error_log; fixed the setting of extra_data --- paste/errormiddleware.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'paste/errormiddleware.py') diff --git a/paste/errormiddleware.py b/paste/errormiddleware.py index 83c4ba8..2ff2007 100644 --- a/paste/errormiddleware.py +++ b/paste/errormiddleware.py @@ -50,7 +50,7 @@ class ErrorMiddleware(object): _config_show_exceptions_in_error_log = metadata.Config( """ If true, then write errors to ``wsgi.errors``. - """, default=True) + """, default=False) def __init__(self, application): self.application = application @@ -184,22 +184,25 @@ def handle_exception(exc_info, conf, error_stream, html=True): smtp_server=conf.get('smtp_server', 'localhost'), subject_prefix=conf.get('error_subject_prefix', '')) rep_err = send_report(rep, exc_data, html=html) - if not rep_err: + if rep_err: extra_data += rep_err + else: reported = True if conf.get('error_log'): rep = reporter.LogReporter( filename=conf['error_log']) rep_err = send_report(rep, exc_data, html=html) - if not rep_err: + if rep_err: extra_data += rep_err + else: reported = True - if conf.get('show_exceptions_in_error_log', True): + if conf.get('show_exceptions_in_error_log', False): rep = reporter.FileReporter( file=error_stream) rep_err = send_report(rep, exc_data, html=html) - if not rep_err: + if rep_err: extra_data += rep_err + else: reported = True else: error_stream.write('Error - %s: %s\n' % ( -- cgit v1.2.1