Apache Log4cxx
Version 1.7.0
Toggle main menu visibility
Loading...
Searching...
No Matches
expressionfilter.h
Go to the documentation of this file.
1
/*
2
* Licensed to the Apache Software Foundation (ASF) under one or more
3
* contributor license agreements. See the NOTICE file distributed with
4
* this work for additional information regarding copyright ownership.
5
* The ASF licenses this file to You under the Apache License, Version 2.0
6
* (the "License"); you may not use this file except in compliance with
7
* the License. You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*/
17
18
#ifndef _LOG4CXX_FILTER_EXPRESSIONFILTER_H
19
#define _LOG4CXX_FILTER_EXPRESSIONFILTER_H
20
21
#include <
log4cxx/spi/filter.h
>
22
23
namespace
LOG4CXX_NS
24
{
25
namespace
rule
26
{
27
class
Rule;
28
typedef
helpers::ObjectPtrT < Rule >
RulePtr
;
29
}
30
31
32
namespace
filter
33
{
34
35
78
class
LOG4CXX_EXPORT ExpressionFilter:
public
LOG4CXX_NS::spi::Filter
79
{
80
private
:
81
bool
acceptOnMatch;
82
bool
convertInFixToPostFix;
83
LOG4CXX_DECLARE_PRIVATE_MEMBER(
LogString
, expression)
84
LOG4CXX_DECLARE_PRIVATE_MEMBER(
rule::RulePtr
, expressionRule)
85
ExpressionFilter(
const
ExpressionFilter&);
86
ExpressionFilter& operator=(
const
ExpressionFilter&);
87
88
public
:
89
DECLARE_LOG4CXX_OBJECT
(ExpressionFilter)
90
BEGIN_LOG4CXX_CAST_MAP
()
91
LOG4CXX_CAST_ENTRY
(LOG4CXX_NS::spi::Filter)
92
END_LOG4CXX_CAST_MAP
()
93
94
95
ExpressionFilter();
96
97
void
activateOptions
(
helpers
::Pool& p) override;
98
99
void
setExpression
(const
LogString
& expression);
100
101
LogString
getExpression
() const;
102
103
void
setConvertInFixToPostFix
(
bool
convertInFixToPostFix);
104
105
bool
getConvertInFixToPostFix
() const;
106
107
void
setAcceptOnMatch
(
bool
acceptOnMatch);
108
109
bool
getAcceptOnMatch
() const;
110
114
FilterDecision
decide
(const
spi
::LoggingEventPtr& event) const override;
115
};
116
}
117
}
118
119
120
#endif
log4cxx::filter::ExpressionFilter::setConvertInFixToPostFix
void setConvertInFixToPostFix(bool convertInFixToPostFix)
log4cxx::filter::ExpressionFilter::getConvertInFixToPostFix
bool getConvertInFixToPostFix() const
log4cxx::filter::ExpressionFilter::getAcceptOnMatch
bool getAcceptOnMatch() const
log4cxx::filter::ExpressionFilter::setExpression
void setExpression(const LogString &expression)
log4cxx::filter::ExpressionFilter::activateOptions
void activateOptions(helpers::Pool &p) override
Activate the options that were previously set with calls to option setters.
log4cxx::filter::ExpressionFilter::setAcceptOnMatch
void setAcceptOnMatch(bool acceptOnMatch)
log4cxx::filter::ExpressionFilter::decide
FilterDecision decide(const spi::LoggingEventPtr &event) const override
Returns log4cxx::spi::Filter#NEUTRAL is there is no string match.
log4cxx::filter::ExpressionFilter::getExpression
LogString getExpression() const
log4cxx::spi::Filter::FilterDecision
FilterDecision
Definition
filter.h:87
filter.h
log4cxx::filter
Definition
andfilter.h:27
log4cxx::helpers
Definition
propertysetter.h:27
log4cxx::rule
Definition
expressionfilter.h:26
log4cxx::rule::RulePtr
helpers::ObjectPtrT< Rule > RulePtr
Definition
expressionfilter.h:28
log4cxx::spi
Definition
appender.h:30
log4cxx::LogString
std::basic_string< logchar > LogString
Definition
logstring.h:60
LOG4CXX_CAST_ENTRY
#define LOG4CXX_CAST_ENTRY(Interface)
Definition
object.h:154
END_LOG4CXX_CAST_MAP
#define END_LOG4CXX_CAST_MAP()
Definition
object.h:148
DECLARE_LOG4CXX_OBJECT
#define DECLARE_LOG4CXX_OBJECT(object)
Definition
object.h:41
BEGIN_LOG4CXX_CAST_MAP
#define BEGIN_LOG4CXX_CAST_MAP()
Definition
object.h:142
src
main
include
log4cxx
filter
expressionfilter.h
Generated by
1.17.0 on
SITE_PUBLISHED_DATE
Copyright © 2017-2026
Apache Software Foundation
. Apache, Chainsaw, log4cxx, Log4j, Log4net, log4php and the Apache logo are
trademarks or registered trademarks
of The Apache Software Foundation.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Privacy Policy
.