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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to