Dear Authors, First I would like to say how great your tool Log::Log4perl module is. Well done. I do have a question on how to make changes on the fly without using the init_and_wait feature that is only for the configuration file. 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:
use Log::Log4perl; # Initialize Logger my %log_conf = ( 'log4perl.rootLogger' => "SCREEN", 'log4perl.appender.SCREEN' => "Log::Log4perl::Appender::Screen", 'log4perl.appender.SCREEN.stderr' => "0", 'log4perl.appender.SCREEN.layout' => "Log::Log4perl::Layout::PatternLayout", 'log4perl.appender.SCREEN.layout.ConversionPattern' => "%d %p %m %n", 'log4perl.appender.SCREEN1' => "Log::Log4perl::Appender::Screen", 'log4perl.appender.SCREEN1.stderr' => "0", 'log4perl.appender.SCREEN1.layout' => "Log::Log4perl::Layout::PatternLayout", 'log4perl.appender.SCREEN1.layout.ConversionPattern' => "FOOBAR %m %n", ); my $ref = \%log_conf; Log::Log4perl::init($ref); my $logger = Log::Log4perl->get_logger(); $logger->info("this is an info log message"); ################### ### 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. How would you suggest this work? Could you do something like: $logger->{log4perl.rootLogger} = "SCREEN, SCREEN1"; Thanks in advance. Bret
------------------------------------------------------------------------------ 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