Apache log4cxx  Version 0.10.0
LocationInfoFilter Class Reference

Location information is usually specified at the appender level - all events associated with an appender either create and parse stack traces or they do not. More...

Inherits Filter.

Public Member Functions

 LocationInfoFilter ()
void activateOptions (log4cxx::helpers::Pool &)
 Usually filters options become active when set.
void setExpression (const LogString &expression)
LogString getExpression () const
void setConvertInFixToPostFix (bool convertInFixToPostFix)
bool getConvertInFixToPostFix () const
FilterDecision decide (const spi::LoggingEventPtr &event) const
 If this event does not already contain location information, evaluate the event against the expression.
- Public Member Functions inherited from Filter
 Filter ()
void addRef () const
void releaseRef () const
log4cxx::spi::FilterPtr getNext () const
void setNext (const log4cxx::spi::FilterPtr &newNext)
void setOption (const LogString &option, const LogString &value)
 Set option to value.
- Public Member Functions inherited from OptionHandler
virtual ~OptionHandler ()
- Public Member Functions inherited from Object
virtual const helpers::ClassgetClass () const
virtual ~Object ()
virtual bool instanceof (const Class &clazz) const =0
virtual const void * cast (const Class &clazz) const =0
- Public Member Functions inherited from ObjectImpl
 ObjectImpl ()
virtual ~ObjectImpl ()

Additional Inherited Members

- Public Types inherited from Filter
enum  FilterDecision { DENY = -1, NEUTRAL = 0, ACCEPT = 1 }
- Static Public Member Functions inherited from Object
static const helpers::ClassgetStaticClass ()
static const
log4cxx::helpers::ClassRegistration
registerClass ()
- Protected Attributes inherited from ObjectImpl
unsigned int volatile ref

Detailed Description

Location information is usually specified at the appender level - all events associated with an appender either create and parse stack traces or they do not.

This is an expensive operation and in some cases not needed for all events associated with an appender.

This filter creates event-level location information only if the provided expression evaluates to true.

For information on expression syntax, see org.apache.log4j.rule.ExpressionRule

Constructor & Destructor Documentation

Member Function Documentation

void activateOptions ( log4cxx::helpers::Pool p)
virtual

Usually filters options become active when set.

We provide a

default do-nothing implementation for convenience.

Reimplemented from Filter.

FilterDecision decide ( const spi::LoggingEventPtr event) const
virtual

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 Filter.

bool getConvertInFixToPostFix ( ) const
LogString getExpression ( ) const
void setConvertInFixToPostFix ( bool  convertInFixToPostFix)
void setExpression ( const LogString expression)

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