Apache Log4cxx
Version 1.3.1
|
When location information is available, individual log statements can be turned on or off depending on their source location. More...
#include <locationinfofilter.h>
Additional Inherited Members | |
![]() | |
enum | FilterDecision { DENY = -1 , NEUTRAL = 0 , ACCEPT = 1 } |
When location information is available, individual log statements can be turned on or off depending on their source location.
This filter allows for filtering messages based off of either the line number of the message, or the name of the method that the log mesage is in. The 'operator' parameter may be used to determine if both the method name and line number must match. If 'operator' is set to 'AND', then both the line number and method name must match, otherwise only one needs to match. By default, 'operator' is set to 'OR'.
If location information is not available, this filter does nothing.
log4cxx::filter::LocationInfoFilter::LocationInfoFilter | ( | ) |
log4cxx::filter::LocationInfoFilter::~LocationInfoFilter | ( | ) |
|
overridevirtual |
If this event does not already contain location information, evaluate the event against the expression.
If the expression evaluates to true, generate a LocationInfo instance by creating an exception and set this LocationInfo on the event.
Returns log4cxx::spi::Filter#NEUTRAL
Implements log4cxx::spi::Filter.
bool log4cxx::filter::LocationInfoFilter::getAcceptOnMatch | ( | ) | const |
bool log4cxx::filter::LocationInfoFilter::getMustMatchAll | ( | ) | const |
|
overridevirtual |
Set option
to value
.
Supported options | Supported values | Default value |
---|---|---|
Method | {any} | - |
LineNumber | {int} | - |
Operator | (1) | Or |
AcceptOnMatch | True,False | True |
(1) If "And", both method name and line number must match, otherwise either method name or line number match.
Reimplemented from log4cxx::spi::Filter.