http://wiki.apache.org/logging-log4j/LogByLevel
That link will show you an example configuration file the uses a Filter. You'd have to replace the LevelMatchFilter with your own class of course, but this link's information should get you started.
cheers,
Paul
Steve Kuo wrote:
Thanks for the quick reply.
Writing the actual filter seems pretty straightforward. How would I go about specifying or plugging in a Filter implementation? Unfortunately the short intro to log4j by Ceki Gülcü makes no mention of filters or using an XML file to specify the config.
Thanks, Steve
--- Paul Smith <[EMAIL PROTECTED]> wrote:
This is quite easy if you code yourself a little
Filter class. An appender can be given a Filter, so create a Filter
impl that takes the event, works out whether it's the type that's been
trapped before, and return Filter.DENY if you don't want to see it.
The class should only be a handful of lines of code for you.
cheers,
Paul Smith
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]