Subject: | Logger->log does not uses $DefaultLevel synchronously |
$DefaultLevel is currently (1.00) used when a log event is processed in
the queue.
However, when Logger->log is called with a scalar argument and
DefaultLevel is changed before log events are processed by the Logger
session, the log message may not be dispatched at the level expected.
I have added a test showing that behavior in the test suite:
http://github.com/dolmen/POE-Component-Logger/commit/0d44a1e47e8ccde1e07357efba26a6ffb9005384
Workaround: use the HASH form of Logger->log:
use:
Logger->log({ level => 'error', message => 'Ouch' });
not:
{
local $POE::Component::Logger::DefaultLevel = 'error';
Logger->log('Ouch');
}
--
Olivier Mengué - http://search.cpan.org/~dolmen/ http://github.com/dolmen/