log4cplus  2.0.8
Public Member Functions | List of all members
log4cplus::spi::NDCMatchFilter Class Reference

This is a simple filter based on the string returned by event.getNDC(). More...

#include <filter.h>

Inheritance diagram for log4cplus::spi::NDCMatchFilter:
[legend]
Collaboration diagram for log4cplus::spi::NDCMatchFilter:
[legend]

Public Member Functions

 NDCMatchFilter ()
 
 NDCMatchFilter (const log4cplus::helpers::Properties &p)
 
virtual FilterResult decide (const InternalLoggingEvent &event) const
 Returns NEUTRAL is there is no string match. More...
 
- Public Member Functions inherited from log4cplus::spi::Filter
 Filter ()
 
virtual ~Filter ()
 
void appendFilter (FilterPtr filter)
 Appends filter to the end of this filter chain. More...
 
- Public Member Functions inherited from log4cplus::helpers::SharedObject
void addReference () const LOG4CPLUS_NOEXCEPT
 
void removeReference () const
 

Additional Inherited Members

- Public Attributes inherited from log4cplus::spi::Filter
FilterPtr next
 Points to the next filter in the filter chain. More...
 
- Public Attributes inherited from log4cplus::helpers::SharedObject
thread::Mutex access_mutex
 
- Protected Member Functions inherited from log4cplus::helpers::SharedObject
 SharedObject ()
 
 SharedObject (const SharedObject &)
 
 SharedObject (SharedObject &&)
 
virtual ~SharedObject ()
 
SharedObjectoperator= (const SharedObject &) LOG4CPLUS_NOEXCEPT
 
SharedObjectoperator= (SharedObject &&) LOG4CPLUS_NOEXCEPT
 

Detailed Description

This is a simple filter based on the string returned by event.getNDC().

The filter admits three options NeutralOnEmpty, NDCToMatch and AcceptOnMatch.

If NeutralOnEmpty is true and NDCToMatch is empty then NEUTRAL is returned.

If NeutralOnEmpty is true and the value returned by event.getNDC() is empty then NEUTRAL is returned.

If the string returned by event.getNDC() matches NDCToMatch, then if AcceptOnMatch is true, ACCEPT is returned, and if AcceptOnMatch is false, DENY is returned.

If the string returned by event.getNDC() does not match NDCToMatch, then if AcceptOnMatch is true, DENY is returned, and if AcceptOnMatch is false, ACCEPT is returned.

Definition at line 328 of file filter.h.

Constructor & Destructor Documentation

◆ NDCMatchFilter() [1/2]

log4cplus::spi::NDCMatchFilter::NDCMatchFilter ( )

◆ NDCMatchFilter() [2/2]

log4cplus::spi::NDCMatchFilter::NDCMatchFilter ( const log4cplus::helpers::Properties p)

Member Function Documentation

◆ decide()

virtual FilterResult log4cplus::spi::NDCMatchFilter::decide ( const InternalLoggingEvent event) const
virtual

Returns NEUTRAL is there is no string match.

Implements log4cplus::spi::Filter.


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