You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Curt Arnold <ca...@apache.org> on 2005/02/12 04:23:53 UTC

Filter based triggering policy

I've committed org.apache.log4j.rolling.FilterBasedTriggeringPolicy and 
associated tests as bug 33531.  The policy will evaluate the current 
message against a set of filters and if the message passes the filters, 
a rollover is initiated.  The associate test is pretty contrived, it 
triggers on any info or high level message and the event stream is 
constructed so the results match the witness files for one of the size 
based rolling tests.

There were two anomalies that I would like to mention.  I created two 
tests, one that used a JoranConfigurator and one that used explicit 
configuration calls.  Each of them would pass in isolation, but if they 
are both enabled, there is some type of interaction.  I gave the 
explicit configuration test a funny name so it isn't recognized as a 
test at the moment, but it would be good for someone to look at it and 
see if I missed something.

The second was a Null Pointer Exception in WriterAppender if you 
configure an appender without a layout using the JoranConfigurator.  If 
you remove the contents from the "CONSOLE" appender element in 
tests/input/rolling/filter1.xml, you should see the problem.  See that 
file also for an example of configuring the triggering policy.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org