Default recoverable error to WARN log level.

Fixes bug 1108631.

Change-Id: Ibe76a7b0badf31e4aba63f6d7f42c461b7ea1023
This commit is contained in:
Lin Hua Cheng 2013-01-28 23:49:25 -08:00
parent 59b7e6011b
commit c2da2e25c6

View File

@ -298,6 +298,8 @@ def handle(request, message=None, redirect=None, ignore=False,
if issubclass(exc_type, RECOVERABLE):
wrap = True
if not force_silence and not handled and (not ignore or force_log):
# Default recoverable error to WARN log level
log_method = getattr(LOG, log_level or "warning")
log_method(error_color("Recoverable error: %s" % exc_value))
if not ignore and not handled:
messages.error(request, message or exc_value)