Enclosed are some (hopefully) useful filters that allow filtering based on:
- logger name - NDC value - MDC key/value There is also a "pass-thru" filter that can be used to set the location info for a logging event, useful when used with other filters to set the location info for only some events and not all. All of these filters are based on a GenericMatchFilter class that allows the user to configure the return values for the 3 match states: match, no match, cannot match. The default return values are accept, deny, and neutral, respectively. But I beleive that allowing the return values to be configurable allows for more flexibility when configuring filter chains of multiple filters. I also believe it makes it possible to use a filter in various ways without requiring modification to the filter code, something I have found myself doing too often. Source, documentation, and sample configurations (with explanation and running code) are included in this package. This is not an official part of the current log4j package, but I am submitting it for possible inclusion in a future version. You are free to use this code in any way you wish, same as the Apache 1.1 license. If you have any questions, suggestions, or comments, I would like to hear back from you. -Mark
filters.zip
Description: Zip compressed data
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>