Ask Your Question
0

Recoverable error logged at ERROR level

asked 2013-01-29 01:11:11 -0500

lin-hua-cheng gravatar image

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.

Should this be logged as warning or info instead?

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2013-01-30 06:19:55 -0500

lin-hua-cheng gravatar image

Thanks Gabriel Hurley, that solved my question.

edit flag offensive delete link more
0

answered 2013-01-29 01:13:04 -0500

lin-hua-cheng gravatar image

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.

edit flag offensive delete link more
0

answered 2013-01-29 01:34:17 -0500

gabriel-hurley gravatar image

I could get behind logging it as a WARN. A real ERROR message was (hopefully) logged on the other end of the API where the problem originated. From Horizon's perspective it's a problem, but we can recover so a full-blown ERROR isn't required.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-01-29 01:11:11 -0500

Seen: 121 times

Last updated: Jan 30 '13