On Fri, 29 Jan 2010, Rob Retter wrote:

> But when your application does:
>  my $wrapper = $Log::Log4perl::Logger::APPENDER_BY_NAME{'somename'};
>  $wrapper->threshold ('INFO');
> what you get is the wrapper object's "level" field set to the... um,
> priority of the 'INFO' level you passed in.

The terminology can be daunting at first, so it helps if you remember
that messages have 'priorities' and loggers have 'levels'. If a message
has a priority higher than the logger's level, the message gets logged
(I'm not going into numerical values of levels/priorities as these are
transparent to the application and hence irrelevant for the purpose of
this discussion.).

Now, appenders have a feature called 'thresholds', which is virtually
identical to a logger's level. If the message priority is higher than
the appender's threshold, the message gets logged.

> But it does leave the actual appender object's "Threshold" field
> unchanged.  So if that field were already 'DEBUG', what you get is a
> wrapper saying one thing about level, while it contains an appender
> saying another thing about Threshold.

I'm not sure where this "Threshold" field you are referring to is
located. Do you mean the configuration file? Can you point me to the
code?

-- Mike

Mike Schilli
m...@perlmeister.com


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
log4perl-devel mailing list
log4perl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/log4perl-devel

Reply via email to