On Wed, 29 Oct 2008, Erskine, Thomas (IT) wrote:
> I want to be able to define an appender in the log4perl config file,
> but not activated and then activate it programmatically 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.
An appender that's not assigned to any logger in the configuration is
ignored by Log4perl at this point -- I think that using a threshold, as
you've suggested, is a perfectly valid solution, though.
Alternatively, you can define the appender programmatically and add it
to the logger via add_appender().
-- Mike
Mike Schilli
[EMAIL PROTECTED]
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
log4perl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/log4perl-devel