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); }
In Section
Seekers of Perl Wisdom