[SUBMIT] GenericMatchFilter.java; SetLocationInfoFilter.java; Log gerNameMatchFilter.java
Mark Womack <mwomack <at> bevocal.com>
2002-04-02 04:09:30 GMT
Enclosed are some new versions of GenericMatchFilter.java and
SetLocationInfoFilter.java. Also enclosed is LoggerNameMatchFilter.java
which subclasses GenericMatchFilter.java.
GenericMatchFilter and SetLocationInfoFilter are pretty much the same except
for some changes needed to get them to compile properly (deprecated options
LoggerNameMatchFilter subclasses GenericMatchFilter and implements code to
check the logger name in the LoggingEvent against a configured set of names.
If it startsWith() any of the configured logger names, then the event is
accepted. Could do something similar with level matching as well, but have
not had a chance to write it yet. Also, I don't claim that
LoggerNameMatchFilter is the most efficient piece of code, but it works as a
Below is a sample configuration using the above filters. If the logger name
in the logging event matches one of the two "loggerName" parameters for the
LoggerNameMatchFilter filter, then it is configured to return NEUTRAL.
Otherwise it returns ACCEPT and the event is immediatly appended.
If the logger name matches, it continues to the second filter,
SetLocationInfoFilter, which will set the location info and let it continue
on to the appender.
<param name="port" value="5000"/>\
<param name="locationInfo" value="false"/>\