[Perl-workflow-devel] Log4perl logging and condition evaluation
Brought to you by:
jonasbn
From: Andrew O'B. <an...@or...> - 2009-02-18 07:28:19
|
Hi guys, Can someone explain the reasoning behind throwing a workflow_error() when conditions evaluate to false? workflow_error() logs at ERROR level. Currently, a condition class with an evaluate() method must call condition_error() in order to signal that the condition has not been met. That propagates to a workflow_error() call in Workflow::State::evaluate_action() any time that a condition evaluates to false. This is caught in Workflow::State::is_action_available() and simply used as a boolean. This, in turn, fills up logs rather more quickly than I'd like. I just can't understand why the simple act of a condition evaluating to false (which happens potentially hundreds of times a second and is a perfectly normal thing for a condition to do) needs to be promoted to this log level. You're basically saying that a condition evaluating to false is just one level of criticality lower than "FATAL" :) As a comparison, a successful condition evaluation is simply logged at DEBUG level and no exception is rethrown (I can understand throwing an exception, just not one that has the side effect of logging at ERROR level) Is this just me? Is there some other side effect of this rethrow sequence that I'm missing? Cheers, Andrew |