log4cplus  2.0.0
Public Member Functions | List of all members
log4cplus::spi::LogLevelMatchFilter Class Reference

This is a very simple filter based on LogLevel matching. More...

#include <filter.h>

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

Public Member Functions

 LogLevelMatchFilter ()
 
 LogLevelMatchFilter (const log4cplus::helpers::Properties &p)
 
virtual FilterResult decide (const InternalLoggingEvent &event) const
 Return the decision of this filter. 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 very simple filter based on LogLevel matching.

The filter admits two options LogLevelToMatch and AcceptOnMatch. If there is an exact match between the value of the LogLevelToMatch option and the LogLevel of the {}, then the #decide} method returns #ACCEPT} in case the AcceptOnMatch option value is set to true, if it is false then #DENY} is returned. If there is no match, #NEUTRAL} is returned.

Definition at line 174 of file filter.h.

Constructor & Destructor Documentation

◆ LogLevelMatchFilter() [1/2]

log4cplus::spi::LogLevelMatchFilter::LogLevelMatchFilter ( )

◆ LogLevelMatchFilter() [2/2]

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

Member Function Documentation

◆ decide()

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

Return the decision of this filter.

Returns NEUTRAL if the LogLevelToMatch option is not set or if there is no match. Otherwise, if there is a match, then the returned decision is ACCEPT if the AcceptOnMatch property is set to true. The returned decision is DENY if the AcceptOnMatch property is set to false.

Implements log4cplus::spi::Filter.


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