Log4j 1.3alpha-5

org.apache.log4j.filter
Class PropertyFilter

java.lang.Object
  |
  +--org.apache.log4j.spi.ComponentBase
        |
        +--org.apache.log4j.spi.Filter
              |
              +--org.apache.log4j.filter.PropertyFilter
All Implemented Interfaces:
Component, 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. Individual properties are only set if they do not already exist on the logging event (will not override existing properties). 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

Field Summary
 
Fields inherited from class org.apache.log4j.spi.Filter
ACCEPT, DENY, NEUTRAL
 
Fields inherited from class org.apache.log4j.spi.ComponentBase
repository
 
Constructor Summary
PropertyFilter()
           
 
Method Summary
 int decide(LoggingEvent event)
          If the decision is DENY, then the event will be dropped.
 void setProperties(java.lang.String props)
           
 
Methods inherited from class org.apache.log4j.spi.Filter
activateOptions, getNext, setNext
 
Methods inherited from class org.apache.log4j.spi.ComponentBase
getLogger, setLoggerRepository
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyFilter

public PropertyFilter()
Method Detail

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.

Log4j 1.3alpha-5

Copyright 2000-2005 Apache Software Foundation.