in reply to Re^3: Strategy for conditional logging in tests
in thread Strategy for conditional logging in tests
Well, I could always add functionality to toggle logging on or off and invoke it during tests, e.g. something simple like this:
However I think it's inelegant to add functionality to the script that is going to be used during testing only. I would rather that the test script did that alone.sub log_toggle { ($_[0]) ? Log::Log4perl->appender_thresholds_adjust(7) : Log::Log4perl->appender_thresholds_adjust(-7); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Strategy for conditional logging in tests
by Thilosophy (Curate) on Apr 02, 2008 at 08:42 UTC | |
by andreas1234567 (Vicar) on Apr 02, 2008 at 09:29 UTC |
In Section
Seekers of Perl Wisdom