You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Mi...@ses-astra.com on 2001/03/28 11:09:11 UTC
PriorityFilterMatch
I've got atrouble when using a PriorityFilterMatch on an Appender.
I want to log INFO priority into a file (and only this priority), and log
all the priorities on the console...
I use this property file :
# configure the root Category
log4j.rootCategory=DEBUG, A1, A2
#configure the A1 appender
log4j.appender.A1=org.apache.log4j.FileAppender
log4j.appender.A1.File=test.html
log4j.appender.A1.layout=org.apache.log4j.HTMLLayout
log4j.appender.A1.Append=false
log4j.appender.A1.filter=org.apache.log4j.varia.PriorityMatchFilter
log4j.appender.A1.filter.PriorityToMatch=INFO
log4j.appender.A1.filter.AcceptOnMatch=true
#configure the A2 appender
log4j.appender.A2=org.apache.log4j.ConsoleAppender
log4j.appender.A2.layout=org.apache.log4j.PatternLayout
log4j.appender.A2.layout.ConversionPattern=%p: %c - %m%n
log4j.appender.A1.Threshold=DEBUG
With this property file, DEBUG informations also appears in test.html
Any idea ???
Michael Poisson
PS : I've got the same comportement using the 1.1beta version
--
DISCLAIMER:
This e-mail contains proprietary information some or all of which may be
legally privileged. It is for the intended recipient only. If an addressing
or transmission error has misdirected this e-mail, please notify the author
by replying to this e-mail. If you are not the intended recipient you must
not use, disclose, distribute, copy, print, or rely on this e-mail.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org
Re: PriorityFilterMatch
Posted by Anders Kristensen <ak...@dynamicsoft.com>.
You cannot currently set per-appender filters via the
PropertyConfigurator. From the PropertyConfigurator javadoc
documentation:
The PropertyConfigurator does not handle the advanced configuration
features supported by the DOMConfigurator such as support for
sub-classing of the Priority class, Filters, custom ErrorHandlers,
nested appenders such as the AsyncAppender, etc.
Anders
Michael_Poisson@ses-astra.com wrote:
>
> I've got atrouble when using a PriorityFilterMatch on an Appender.
>
> I want to log INFO priority into a file (and only this priority), and log
> all the priorities on the console...
>
> I use this property file :
>
> # configure the root Category
> log4j.rootCategory=DEBUG, A1, A2
>
> #configure the A1 appender
> log4j.appender.A1=org.apache.log4j.FileAppender
> log4j.appender.A1.File=test.html
> log4j.appender.A1.layout=org.apache.log4j.HTMLLayout
> log4j.appender.A1.Append=false
> log4j.appender.A1.filter=org.apache.log4j.varia.PriorityMatchFilter
> log4j.appender.A1.filter.PriorityToMatch=INFO
> log4j.appender.A1.filter.AcceptOnMatch=true
>
> #configure the A2 appender
> log4j.appender.A2=org.apache.log4j.ConsoleAppender
> log4j.appender.A2.layout=org.apache.log4j.PatternLayout
> log4j.appender.A2.layout.ConversionPattern=%p: %c - %m%n
> log4j.appender.A1.Threshold=DEBUG
>
> With this property file, DEBUG informations also appears in test.html
>
> Any idea ???
>
> Michael Poisson
>
> PS : I've got the same comportement using the 1.1beta version
>
> --
> DISCLAIMER:
> This e-mail contains proprietary information some or all of which may be
> legally privileged. It is for the intended recipient only. If an addressing
> or transmission error has misdirected this e-mail, please notify the author
> by replying to this e-mail. If you are not the intended recipient you must
> not use, disclose, distribute, copy, print, or rely on this e-mail.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org