Loading...
Searching...
No Matches
Filter.hh
Go to the documentation of this file.
/*
* Filter.hh
*
* Copyright 2001, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
* Copyright 2001, Bastiaan Bakker. All rights reserved.
*
* See the COPYING file for the terms of usage and distribution.
*/
#ifndef _LOG4SHIB_FILTER_HH
#define _LOG4SHIB_FILTER_HH
#include <log4shib/Portability.hh>
#include <log4shib/LoggingEvent.hh>
namespace log4shib {
class LOG4SHIB_EXPORT Filter {
public:
typedef enum { DENY = -1,
NEUTRAL = 0,
ACCEPT = 1
} Decision;
Filter();
virtual ~Filter();
virtual void setChainedFilter(Filter* filter);
virtual Filter* getChainedFilter();
virtual Filter* getEndOfChain();
virtual void appendChainedFilter(Filter* filter);
virtual Decision decide(const LoggingEvent& event);
protected:
virtual Decision _decide(const LoggingEvent& event) = 0;
private:
Filter* _chainedFilter;
};
}
#endif // _LOG4SHIB_FILTER_HH
LOG4SHIB_EXPORT
#define LOG4SHIB_EXPORT
Definition Export.hh:11
LoggingEvent.hh
Portability.hh
log4shib::Filter
Users should extend this class to implement customized logging event filtering.
Definition Filter.hh:49
log4shib::Filter::Filter
Filter()
Default Constructor for Filter.
Definition Filter.cpp:15
log4shib::Filter::Decision
Decision
Definition Filter.hh:52
log4shib::Filter::ACCEPT
@ ACCEPT
Definition Filter.hh:54
log4shib::Filter::NEUTRAL
@ NEUTRAL
Definition Filter.hh:53
log4shib::Filter::DENY
@ DENY
Definition Filter.hh:52
log4shib::Filter::_decide
virtual Decision _decide(const LoggingEvent &event)=0
Decide whether this Filter accepts or denies the given LoggingEvent.
log4shib
The top level namespace for all 'Log for C++' types and classes.
Definition AbortAppender.hh:16
log4shib::LoggingEvent
The internal representation of logging events.
Definition LoggingEvent.hh:32