On Mon, 2 Oct 2006, Roger Day wrote:
> Apologies if this is a n00b question - I've already trawled the docos.
>
> I've a log.conf file which contains the configuration for a STDOUT
> appender. I initialise log4perl with the init call using that log.conf,
> however the STDOUT appender isn't invoked at this stage. Later on, I want
> to invoke the STDOUT appender in the code - something like
> "$logger.add_appender("<something that goes here which indicates the
> STDOUT appender>") Is this in the right barnyard? What is the correct
> procedure please?
If you want to reference an appender in the configuration by name, use
Log::Log4perl->appender_by_name("appender_name")
as described in
http://log4perl.sourceforge.net/d/Log/Log4perl.html#356d5
-- Mike
Mike Schilli
m@xxxxxxxxxxxxxxx
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
|