From: Quinn W. <qu...@fa...> - 2007-06-19 00:55:31
|
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 |