org.apache.log4j.varia
Class PropertyFilter
java.lang.Object
|
+--org.apache.log4j.spi.Filter
|
+--org.apache.log4j.varia.PropertyFilter
- All Implemented Interfaces:
- OptionHandler
- public class PropertyFilter
- extends Filter
NOTE: This filter modifies logging events by adding properties to the event.
The 'properties' param is converted to event properties, which are
set on every event processed by the filter.
This class relies on the convention that property name/value pairs are
equals-symbol delimited, and each name/value pair is comma-delimited
Example properties param:
somename=somevalue,anothername=anothervalue,thirdname=third value
- Since:
- 1.3
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertyFilter
public PropertyFilter()
setProperties
public void setProperties(java.lang.String props)
decide
public int decide(LoggingEvent event)
- Description copied from class:
Filter
If the decision is DENY
, then the event will be
dropped. If the decision is NEUTRAL
, then the next
filter, if any, will be invoked. If the decision is ACCEPT then
the event will be logged without consulting with other filters in
the chain.
- Specified by:
decide
in class Filter
- Parameters:
event
- The LoggingEvent to decide upon.
Copyright 2000-2003 Apache Software Foundation.