[log4perl-devel] Writing to logs with different thresholds

2011-07-26 Thread Robert Rothenberg
I have a collection of related tools that write to a shared log, generally
at the INFO or WARNING level.

One of the tools has a separate log that it writes to at a lower level
(DEBUG or TRACE).  But I still want higher priority messages to show up in
the shared log.

The problem that I am having is that the DEBUG log messages for the tool
also go into the shared log.

I've tried changing the threshold for the shared log to INFO

  log4perl.appender.SharedLog.Treshold = INFO

but the DEBUG messages still get added to it.

I've also tried using a subcategory:

  log4perl.logger.mytool = INFO, SharedLog
  log4perl.logger.mytool.debug = DEBUG, DebugLog

and then using

  $logger = get_logger("mytool.debug");

but still the DEBUG messages show up in the SharedLog.

Thanks in advance,
Rob

--
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
___
log4perl-devel mailing list
log4perl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/log4perl-devel


Re: [log4perl-devel] Writing to logs with different thresholds

2011-07-26 Thread Mike Schilli
On Tue, 26 Jul 2011, Robert Rothenberg wrote:

> I've tried changing the threshold for the shared log to INFO
> log4perl.appender.SharedLog.Treshold = INFO

If you fix the typo ("Treshold" => "Threshold"), that's exactly the
recommended way to accomplish what you want.

-- 
-- Mike

Mike Schilli
m...@perlmeister.com

>
> but the DEBUG messages still get added to it.
>
> I've also tried using a subcategory:
>
>  log4perl.logger.mytool = INFO, SharedLog
>  log4perl.logger.mytool.debug = DEBUG, DebugLog
>
> and then using
>
>  $logger = get_logger("mytool.debug");
>
> but still the DEBUG messages show up in the SharedLog.
>
> Thanks in advance,
> Rob
>
> --
> Magic Quadrant for Content-Aware Data Loss Prevention
> Research study explores the data loss prevention market. Includes in-depth
> analysis on the changes within the DLP market, and the criteria used to
> evaluate the strengths and weaknesses of these DLP solutions.
> http://www.accelacomm.com/jaw/sfnl/114/51385063/
> ___
> log4perl-devel mailing list
> log4perl-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/log4perl-devel
>

--
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
___
log4perl-devel mailing list
log4perl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/log4perl-devel