Apache Log4cxx
Version 1.3.1
|
NOTE: This filter modifies logging events by adding properties to the event. More...
#include <propertyfilter.h>
Public Member Functions | |
PropertyFilter () | |
~PropertyFilter () | |
void | setProperties (const LogString &props) |
FilterDecision | decide (const spi::LoggingEventPtr &event) const override |
Public Member Functions inherited from log4cxx::spi::Filter | |
Filter () | |
Filter (std::unique_ptr< FilterPrivate > priv) | |
virtual | ~Filter () |
log4cxx::spi::FilterPtr | getNext () const |
void | setNext (const log4cxx::spi::FilterPtr &newNext) |
void | activateOptions (helpers::Pool &p) override |
Activate the options that were previously set with calls to option setters. | |
void | setOption (const LogString &option, const LogString &value) override |
Set option to value . | |
virtual FilterDecision | decide (const LoggingEventPtr &event) const =0 |
Public Member Functions inherited from log4cxx::spi::OptionHandler | |
virtual | ~OptionHandler () |
virtual void | activateOptions (helpers::Pool &p)=0 |
Activate the options that were previously set with calls to option setters. | |
virtual void | setOption (const LogString &option, const LogString &value)=0 |
Set option to value . | |
Public Member Functions inherited from log4cxx::helpers::Object | |
virtual | ~Object () |
virtual const helpers::Class & | getClass () const =0 |
virtual bool | instanceof (const Class &clazz) const =0 |
virtual const void * | cast (const Class &clazz) const =0 |
Additional Inherited Members | |
Public Types inherited from log4cxx::spi::Filter | |
enum | FilterDecision { DENY = -1 , NEUTRAL = 0 , ACCEPT = 1 } |
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
log4cxx::filter::PropertyFilter::PropertyFilter | ( | ) |
log4cxx::filter::PropertyFilter::~PropertyFilter | ( | ) |
|
overridevirtual |
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.
event | The LoggingEvent to decide upon. |
Implements log4cxx::spi::Filter.
void log4cxx::filter::PropertyFilter::setProperties | ( | const LogString & | props | ) |