Re: [Perl-workflow-devel] Log4perl logging and condition evaluation
Brought to you by:
jonasbn
From: Jim B. <cb...@bu...> - 2009-02-26 16:30:03
|
If the main issue is the debug level, maybe you can do something like: 'log4perl.logger.Workflow.Exception.Condition' => 'DEBUG', in your log4perl settings? I didn't test the above specifically, but we have various components in workflow set to different values in each of our environments (dev, QA, prod) depending on how chatty we want it to be. It may be more complicated if they become a workflow error as you said below. In our configuration, I think we generally don't route people to actions they shouldn't be performing, so conditions are a backstop rather than a primary way to manage who can perform which actions. Andrew O'Brien wrote: > 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 > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Perl-workflow-devel mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-workflow-devel -- Jim Brandt Administrative Computing Services University at Buffalo |