Apache log4cxx  Version 0.12.1
log4cxx::filter::MapFilter Class Reference

A Filter that operates on a Map and can be used like in the following example: More...

#include <mapfilter.h>

Inheritance diagram for log4cxx::filter::MapFilter:
log4cxx::spi::Filter log4cxx::spi::OptionHandler log4cxx::helpers::Object log4cxx::helpers::Object

Public Member Functions

 MapFilter ()
virtual void setOption (const LogString &option, const LogString &value)
 Set options. More...
void setKeyValue (const LogString &strKey, const LogString &strValue)
const LogStringgetValue (const LogString &strKey) const
void setAcceptOnMatch (bool acceptOnMatch1)
bool getAcceptOnMatch () const
bool getMustMatchAll () const
void setMustMatchAll (bool mustMatchAll1)
FilterDecision decide (const spi::LoggingEventPtr &event) const
 Returns NEUTRAL is there is no string match. More...
- Public Member Functions inherited from log4cxx::spi::Filter
 Filter ()
log4cxx::spi::FilterPtr getNext () const
void setNext (const log4cxx::spi::FilterPtr &newNext)
void activateOptions (log4cxx::helpers::Pool &p)
 Usually filters options become active when set. More...
void setOption (const LogString &option, const LogString &value)
 Set option to value. More...
- Public Member Functions inherited from log4cxx::spi::OptionHandler
virtual ~OptionHandler ()
- Public Member Functions inherited from log4cxx::helpers::Object
virtual ~Object ()
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 }

Detailed Description

A Filter that operates on a Map and can be used like in the following example:

<filter class="MapFilter">
    <param name="user.ip"       value="" />
    <param name="user.name"     value="test2"     />
    <param name="Operator"      value="AND"       />
    <param name="AcceptOnMatch" value="false"     />

Constructor & Destructor Documentation

◆ MapFilter()

log4cxx::filter::MapFilter::MapFilter ( )

Member Function Documentation

◆ decide()

FilterDecision log4cxx::filter::MapFilter::decide ( const spi::LoggingEventPtr event) const

Returns NEUTRAL is there is no string match.

Implements log4cxx::spi::Filter.

◆ getAcceptOnMatch()

bool log4cxx::filter::MapFilter::getAcceptOnMatch ( ) const

◆ getMustMatchAll()

bool log4cxx::filter::MapFilter::getMustMatchAll ( ) const

◆ getValue()

const LogString& log4cxx::filter::MapFilter::getValue ( const LogString strKey) const

◆ setAcceptOnMatch()

void log4cxx::filter::MapFilter::setAcceptOnMatch ( bool  acceptOnMatch1)

◆ setKeyValue()

void log4cxx::filter::MapFilter::setKeyValue ( const LogString strKey,
const LogString strValue 

◆ setMustMatchAll()

void log4cxx::filter::MapFilter::setMustMatchAll ( bool  mustMatchAll1)

◆ setOption()

virtual void log4cxx::filter::MapFilter::setOption ( const LogString option,
const LogString value 

Set options.

Implements log4cxx::spi::OptionHandler.

The documentation for this class was generated from the following file: