Recoverable error should be logged at WARN level

Bug #1108631 reported by Lin Hua Cheng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Undecided
Lin Hua Cheng

Bug Description

In the error handling of horizon, recoverable error is logged at ERROR LEVEL.

    if issubclass(exc_type, RECOVERABLE):
        wrap = True
        if not force_silence and not handled and (not ignore or force_log):
            log_method(error_color("Recoverable error: %s" % exc_value))
        if not ignore and not handled:
            messages.error(request, message or exc_value)
        if redirect:
            raise Http302(redirect)
        if not escalate:
            return RecoverableError # return to normal code flow

Recoverable exceptions are typically application exception or validation error that the user can fix.

Logging recoverable error as ERROR in the log might cause false alarm if there are log file monitoring is in place that looks for ERRORs.

summary: - Recoverable error should be logged at ERROR level
+ Recoverable error should be logged at WARN level
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/20674

Changed in horizon:
assignee: nobody → Lin Hua Cheng (lin-hua-cheng)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/20674
Committed: http://github.com/openstack/horizon/commit/c2da2e25c6513ba8cd847a38e701a9a2426a1d18
Submitter: Jenkins
Branch: master

commit c2da2e25c6513ba8cd847a38e701a9a2426a1d18
Author: Lin Hua Cheng <email address hidden>
Date: Mon Jan 28 23:49:25 2013 -0800

    Default recoverable error to WARN log level.

    Fixes bug 1108631.

    Change-Id: Ibe76a7b0badf31e4aba63f6d7f42c461b7ea1023

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
milestone: none → grizzly-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: grizzly-3 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.