|
From: Erskine, T. \(IT\) <Tho...@mo...> - 2008-10-29 13:09:40
|
Hi folks.
I want to be able to define an appender in the log4perl config file, but
not activated and then activate it programmatically. I.E. I have:
log4perl.logger = TRACE, FILE, SCREEN
log4perl.appender.FILE = Log::Log4perl::Appender::File
... [definition snipped]
log4perl.appender.SCREEN = Log::Log4perl::Appender::Screen
... [definition snipped]
log4perl.appender.SCREENDEBUG =
Log::Log4perl::Appender::ScreenColoredLevels
... [definition snipped]
However, Log::Log4perl->appender_by_name('SCREENDEBUG') returns undef.
I guess I could add SCREENDEBUG to the log4perl.logger line and define
it with a threshold which won't log anything and then bump the threshold
up at runtime, but it seems wrong somehow.
Is there a way to do this, using the public API, or am I stuck with
diddling the threshiold?
Thomas Erskine
Consultant | Technology
2000 Barrington St | Suite 300 | Floor 04
Halifax, NS B3J3K1
Phone: +1 902 442-4709
Tho...@mo...
--------------------------------------------------------
NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.
|