Hi,

I noticed I can't call layout() on Log::Dispatch appenders:

my $syslog_appender = Log::Log4perl::appender_by_name( 'MyAppender' );
my $layout = $syslog_appender->layout();

Can't locate object method "layout" via package "Log::Dispatch::Syslog" at ...

Is there any way around this?  Would it be worthwhile to write a set of
wrappers to Log::Dispatch classes so they support the appender() method?

Apologies if there is an obvious solution to this; I wasn't able to
find one in the docs.

PS:  The reason I'm using Perl (instead of the configuration file little
language) is that I have some behavior I want to configure conditionally...
I want to add a ScreenAppender iff a MY_DEBUG environment variable is set,
but with the same layout as my existing Log::Dispatch::Syslog appender.

-- 
Quinn Weaver, independent contractor  |  President, San Francisco Perl Mongers
http://fairpath.com/quinn/resume/     |  http://sf.pm.org/
510-520-5217

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
log4perl-devel mailing list
log4perl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/log4perl-devel

Reply via email to