In a message dated 11/23/2002 8:10:53 PM Eastern Standard Time, Kevin Goess <ke...@go...> writes:
>If you're an API kind of person, there's also this call:
>
> Log::Log4perl::Layout::PatternLayout::
> add_global_cspec('Z', sub {'zzzzzzzz'}); #snooze?
Awesome, thanks Kevin! Defining the cspecs in the config file definitely makes sense, having them next to where they're actually used (in the layout defs), and for them to be defined by the same person editing the conf file sold me on the idea.
The security aspects you've found are a good catch and valid, having separate access rights for config files vs. programs is not that uncommon (or at least there might be different rules for QA/deployment), so we might have an issue there. But empowering the application to prevent defining code snippets in the config file, like you've done it, should do the trick, I think. Regarding the default, one could really argue both ways: Having it disabled by default is probably a minor hurdle, having it enabled by default might catch some people by surprise who haven't read the entire manual.
BTW, on first glance, I haven't found the Perl API to the appender-specific cspec definition yet -- is there such a thing?
Again, great work, thanks!
--
-- Mike
############################
# Mike Schilli #
# log...@pe... #
# http://perlmeister.com #
# log4perl.sourceforge.net #
############################
|