On Mon, 8 Aug 2011, Bret Jordan wrote:

Or how do we make init_and_wait work for a ref to a hash that contains
the config?.  What I would like is something like the following:
... ### Now this is where you would change the running config per say, basically adding a
second output
$ref->{log4perl.rootLogger} = "SCREEN, SCREEN1";
$logger->info("this is more info log message");
But this does not obviously work.

All that's missing is a call to Log::Log4perl->init() with the changed
hash afterwards. You could even encapsulate that call and offer a
function that does both, change the data structure and call init(). If
you want to get really fancy, you could offer a tied hash, intercept the
STORE function and call init() whenever something changes.

Would that work for you?

--
-- Mike

Mike Schilli
m...@perlmeister.com
------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
log4perl-devel mailing list
log4perl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/log4perl-devel

Reply via email to