|
From: Gangemi, J. <Jae...@bm...> - 2012-04-17 21:23:52
|
hello -
i'm currently running log4perl inside an embedded instance, for all
intents and purposes, you could say it's an environment similar to
mod_perl.
while the system is running, i would like to send a command that changes
the log level of either the root logger or against one of the logger
categories (and potentially dynamically adding an appender so i can log to
a separate file.
the problem i am having the log level does not persist between calls
into the system. i can make a call in and change the log level (and log a
message at the new level to make sure it worked) but on a subsequent call,
the log level has been reset to what log4perl was originally initialized
with, i.e.:
$logger = Log::Log4perl->get_logger("");
$logger->fatal("fatal message");
$logger->trace("trace message, should not see");
$logger->level($TRACE);
$logger->level("trace message, should see");
am i missing something w/ this idea or will i need to re-initialize
log4perl w/ a new configuration in order to make this work?
thanks!
--
-jae
|