log4cpp
1.1.6
Toggle main menu visibility
Loading...
Searching...
No Matches
Filter.hh
Go to the documentation of this file.
1
/*
2
* Filter.hh
3
*
4
* Copyright 2001, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
5
* Copyright 2001, Bastiaan Bakker. All rights reserved.
6
*
7
* See the COPYING file for the terms of usage and distribution.
8
*/
9
10
#ifndef _LOG4CPP_FILTER_HH
11
#define _LOG4CPP_FILTER_HH
12
13
#include <
log4cpp/LoggingEvent.hh
>
14
#include <
log4cpp/Portability.hh
>
15
16
namespace
log4cpp
{
17
48
49
class
LOG4CPP_EXPORT
Filter
{
50
public
:
51
typedef
enum
{
DENY
= -1,
NEUTRAL
= 0,
ACCEPT
= 1 } Decision;
52
56
Filter
();
57
61
virtual
~Filter
();
62
67
virtual
void
setChainedFilter(
Filter
* filter);
68
74
virtual
Filter
* getChainedFilter();
75
80
virtual
Filter
* getEndOfChain();
81
87
virtual
void
appendChainedFilter(
Filter
* filter);
88
96
virtual
Decision decide(
const
LoggingEvent
& event);
97
98
protected
:
106
virtual
Decision
_decide
(
const
LoggingEvent
& event) = 0;
107
108
private
:
109
Filter
* _chainedFilter;
110
};
111
112
}
// namespace log4cpp
113
114
#endif
// _LOG4CPP_FILTER_HH
LOG4CPP_EXPORT
#define LOG4CPP_EXPORT
Definition
Export.hh:26
LoggingEvent.hh
Portability.hh
log4cpp::Filter
Users should extend this class to implement customized logging event filtering.
Definition
Filter.hh:49
log4cpp::Filter::Decision
Decision
Definition
Filter.hh:51
log4cpp::Filter::DENY
@ DENY
Definition
Filter.hh:51
log4cpp::Filter::ACCEPT
@ ACCEPT
Definition
Filter.hh:51
log4cpp::Filter::NEUTRAL
@ NEUTRAL
Definition
Filter.hh:51
log4cpp::Filter::Filter
Filter()
Default Constructor for Filter.
Definition
Filter.cpp:15
log4cpp::Filter::_decide
virtual Decision _decide(const LoggingEvent &event)=0
Decide whether this Filter accepts or denies the given LoggingEvent.
log4cpp
The top level namespace for all 'Log for C++' types and classes.
Definition
AbortAppender.hh:16
log4cpp::LoggingEvent
The internal representation of logging events.
Definition
LoggingEvent.hh:32
include
log4cpp
Filter.hh
Generated by
1.17.0