|
From: Mike S. <m...@pe...> - 2011-08-09 03:15:29
|
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...@pe... |