<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software | |
distributed under the License is distributed on an "AS IS" BASIS, | |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | |
limitations under the License. | |
--><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | |
<title>Apache log4cxx: StringMatchFilter Class Reference</title> | |
<link href="doxygen.css" rel="stylesheet" type="text/css"> | |
<link href="tabs.css" rel="stylesheet" type="text/css"> | |
</head><body> | |
<!-- Generated by Doxygen 1.4.6 --> | |
<div class="tabs"> | |
<ul> | |
<li><a href="main.html"><span>Main Page</span></a></li> | |
<li><a href="modules.html"><span>Modules</span></a></li> | |
<li><a href="namespaces.html"><span>Namespaces</span></a></li> | |
<li id="current"><a href="classes.html"><span>Classes</span></a></li> | |
<li><a href="files.html"><span>Files</span></a></li> | |
</ul></div> | |
<div class="tabs"> | |
<ul> | |
<li><a href="classes.html"><span>Alphabetical List</span></a></li> | |
<li><a href="annotated.html"><span>Class List</span></a></li> | |
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> | |
<li><a href="functions.html"><span>Class Members</span></a></li> | |
</ul></div> | |
<div class="nav"> | |
<a class="el" href="namespacelog4cxx.html">log4cxx</a>::<a class="el" href="namespacelog4cxx_1_1filter.html">filter</a>::<a class="el" href="classlog4cxx_1_1filter_1_1_string_match_filter.html">StringMatchFilter</a></div> | |
<h1>StringMatchFilter Class Reference</h1><!-- doxytag: class="log4cxx::filter::StringMatchFilter" --><!-- doxytag: inherits="log4cxx::spi::Filter" -->Inherits <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html">Filter</a>. | |
<p> | |
<a href="classlog4cxx_1_1filter_1_1_string_match_filter-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2> | |
This is a very simple filter based on string matching. | |
<p> | |
The filter admits two options <b>StringToMatch</b> and <b>AcceptOnMatch</b>. If there is a match between the value of the StringToMatch option and the message of the <a class="el" href="classlog4cxx_1_1spi_1_1_logging_event.html">LoggingEvent</a>, then the <a class="el" href="classlog4cxx_1_1filter_1_1_string_match_filter.html#f0945cde84b8648b7497a6140e91ac5c">decide</a> method returns <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#8c8b0cee5b13b164894f9eedd8d78bcd5707b7b8bf1b098d620552e9576d8061">ACCEPT</a> if the <b>AcceptOnMatch</b> option value is true, if it is false then <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#8c8b0cee5b13b164894f9eedd8d78bcd692e4d49cf7d68c58e78875ae1833fc3">DENY</a> is returned. If there is no match, <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#8c8b0cee5b13b164894f9eedd8d78bcdf46d14eb9d5d71afc9f6e747689fcb56">NEUTRAL</a> is returned.<p> | |
See configuration files <a href="../xml/doc-files/test6.xml" | |
>test6.xml</a>, <a href="../xml/doc-files/test7.xml" | |
>test7.xml</a>, <a href="../xml/doc-files/test8.xml" | |
>test8.xml</a>, <a href="../xml/doc-files/test9.xml" | |
>test9.xml</a>, and <a href="../xml/doc-files/test10.xml" | |
>test10.xml</a> for examples of seeting up a <code><a class="el" href="classlog4cxx_1_1filter_1_1_string_match_filter.html">StringMatchFilter</a></code>. | |
<p> | |
<table border="0" cellpadding="0" cellspacing="0"> | |
<tr><td></td></tr> | |
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr> | |
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html">spi::Filter</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1filter_1_1_string_match_filter.html#183a00dc056dcc8be3cf0627730b54ca">BASE_CLASS</a></td></tr> | |
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> | |
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1filter_1_1_string_match_filter.html#2ced8b84d01ed0708a7d181a014b277a">StringMatchFilter</a> ()</td></tr> | |
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1filter_1_1_string_match_filter.html#ee5023c29cca9dc68164b22a01cb7c6e">setOption</a> (const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &option, const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &value)</td></tr> | |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set options. <a href="#ee5023c29cca9dc68164b22a01cb7c6e"></a><br></td></tr> | |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1filter_1_1_string_match_filter.html#162e26535f52ca245084a459213ce7b6">setStringToMatch</a> (const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &stringToMatch1)</td></tr> | |
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1filter_1_1_string_match_filter.html#c6fd80bbf330cb6a3853ebb114b96f24">getStringToMatch</a> () const </td></tr> | |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1filter_1_1_string_match_filter.html#8eefe1b300288451e6c0d570745eb7c3">setAcceptOnMatch</a> (bool acceptOnMatch1)</td></tr> | |
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1filter_1_1_string_match_filter.html#1570b78d22e1bc9fd62145ed47b1b9d7">getAcceptOnMatch</a> () const </td></tr> | |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#8c8b0cee5b13b164894f9eedd8d78bcd">FilterDecision</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1filter_1_1_string_match_filter.html#f0945cde84b8648b7497a6140e91ac5c">decide</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">spi::LoggingEventPtr</a> &event) const </td></tr> | |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#8c8b0cee5b13b164894f9eedd8d78bcdf46d14eb9d5d71afc9f6e747689fcb56">NEUTRAL</a> is there is no string match. <a href="#f0945cde84b8648b7497a6140e91ac5c"></a><br></td></tr> | |
</table> | |
<hr><h2>Member Typedef Documentation</h2> | |
<a class="anchor" name="183a00dc056dcc8be3cf0627730b54ca"></a><!-- doxytag: member="log4cxx::filter::StringMatchFilter::BASE_CLASS" ref="183a00dc056dcc8be3cf0627730b54ca" args="" --><p> | |
<table class="mdTable" cellpadding="2" cellspacing="0"> | |
<tr> | |
<td class="mdRow"> | |
<table cellpadding="0" cellspacing="0" border="0"> | |
<tr> | |
<td class="md" nowrap valign="top">typedef <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html">spi::Filter</a> <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html">BASE_CLASS</a> </td> | |
</tr> | |
</table> | |
</td> | |
</tr> | |
</table> | |
<table cellspacing="5" cellpadding="0" border="0"> | |
<tr> | |
<td> | |
| |
</td> | |
<td> | |
<p> | |
</td> | |
</tr> | |
</table> | |
<hr><h2>Constructor & Destructor Documentation</h2> | |
<a class="anchor" name="2ced8b84d01ed0708a7d181a014b277a"></a><!-- doxytag: member="log4cxx::filter::StringMatchFilter::StringMatchFilter" ref="2ced8b84d01ed0708a7d181a014b277a" args="()" --><p> | |
<table class="mdTable" cellpadding="2" cellspacing="0"> | |
<tr> | |
<td class="mdRow"> | |
<table cellpadding="0" cellspacing="0" border="0"> | |
<tr> | |
<td class="md" nowrap valign="top"><a class="el" href="classlog4cxx_1_1filter_1_1_string_match_filter.html">StringMatchFilter</a> </td> | |
<td class="md" valign="top">( </td> | |
<td class="mdname1" valign="top" nowrap> </td> | |
<td class="md" valign="top"> ) </td> | |
<td class="md" nowrap></td> | |
</tr> | |
</table> | |
</td> | |
</tr> | |
</table> | |
<table cellspacing="5" cellpadding="0" border="0"> | |
<tr> | |
<td> | |
| |
</td> | |
<td> | |
<p> | |
</td> | |
</tr> | |
</table> | |
<hr><h2>Member Function Documentation</h2> | |
<a class="anchor" name="f0945cde84b8648b7497a6140e91ac5c"></a><!-- doxytag: member="log4cxx::filter::StringMatchFilter::decide" ref="f0945cde84b8648b7497a6140e91ac5c" args="(const spi::LoggingEventPtr &event) const " --><p> | |
<table class="mdTable" cellpadding="2" cellspacing="0"> | |
<tr> | |
<td class="mdRow"> | |
<table cellpadding="0" cellspacing="0" border="0"> | |
<tr> | |
<td class="md" nowrap valign="top"><a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#8c8b0cee5b13b164894f9eedd8d78bcd">FilterDecision</a> decide </td> | |
<td class="md" valign="top">( </td> | |
<td class="md" nowrap valign="top">const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">spi::LoggingEventPtr</a> & </td> | |
<td class="mdname1" valign="top" nowrap> <em>event</em> </td> | |
<td class="md" valign="top"> ) </td> | |
<td class="md" nowrap> const<code> [virtual]</code></td> | |
</tr> | |
</table> | |
</td> | |
</tr> | |
</table> | |
<table cellspacing="5" cellpadding="0" border="0"> | |
<tr> | |
<td> | |
| |
</td> | |
<td> | |
<p> | |
Returns <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#8c8b0cee5b13b164894f9eedd8d78bcdf46d14eb9d5d71afc9f6e747689fcb56">NEUTRAL</a> is there is no string match. | |
<p> | |
<p> | |
Implements <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#88283dec47599dde698374489126f01c">Filter</a>. </td> | |
</tr> | |
</table> | |
<a class="anchor" name="1570b78d22e1bc9fd62145ed47b1b9d7"></a><!-- doxytag: member="log4cxx::filter::StringMatchFilter::getAcceptOnMatch" ref="1570b78d22e1bc9fd62145ed47b1b9d7" args="() const " --><p> | |
<table class="mdTable" cellpadding="2" cellspacing="0"> | |
<tr> | |
<td class="mdRow"> | |
<table cellpadding="0" cellspacing="0" border="0"> | |
<tr> | |
<td class="md" nowrap valign="top">bool getAcceptOnMatch </td> | |
<td class="md" valign="top">( </td> | |
<td class="mdname1" valign="top" nowrap> </td> | |
<td class="md" valign="top"> ) </td> | |
<td class="md" nowrap> const<code> [inline]</code></td> | |
</tr> | |
</table> | |
</td> | |
</tr> | |
</table> | |
<table cellspacing="5" cellpadding="0" border="0"> | |
<tr> | |
<td> | |
| |
</td> | |
<td> | |
<p> | |
</td> | |
</tr> | |
</table> | |
<a class="anchor" name="c6fd80bbf330cb6a3853ebb114b96f24"></a><!-- doxytag: member="log4cxx::filter::StringMatchFilter::getStringToMatch" ref="c6fd80bbf330cb6a3853ebb114b96f24" args="() const " --><p> | |
<table class="mdTable" cellpadding="2" cellspacing="0"> | |
<tr> | |
<td class="mdRow"> | |
<table cellpadding="0" cellspacing="0" border="0"> | |
<tr> | |
<td class="md" nowrap valign="top">const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a>& getStringToMatch </td> | |
<td class="md" valign="top">( </td> | |
<td class="mdname1" valign="top" nowrap> </td> | |
<td class="md" valign="top"> ) </td> | |
<td class="md" nowrap> const<code> [inline]</code></td> | |
</tr> | |
</table> | |
</td> | |
</tr> | |
</table> | |
<table cellspacing="5" cellpadding="0" border="0"> | |
<tr> | |
<td> | |
| |
</td> | |
<td> | |
<p> | |
</td> | |
</tr> | |
</table> | |
<a class="anchor" name="8eefe1b300288451e6c0d570745eb7c3"></a><!-- doxytag: member="log4cxx::filter::StringMatchFilter::setAcceptOnMatch" ref="8eefe1b300288451e6c0d570745eb7c3" args="(bool acceptOnMatch1)" --><p> | |
<table class="mdTable" cellpadding="2" cellspacing="0"> | |
<tr> | |
<td class="mdRow"> | |
<table cellpadding="0" cellspacing="0" border="0"> | |
<tr> | |
<td class="md" nowrap valign="top">void setAcceptOnMatch </td> | |
<td class="md" valign="top">( </td> | |
<td class="md" nowrap valign="top">bool </td> | |
<td class="mdname1" valign="top" nowrap> <em>acceptOnMatch1</em> </td> | |
<td class="md" valign="top"> ) </td> | |
<td class="md" nowrap><code> [inline]</code></td> | |
</tr> | |
</table> | |
</td> | |
</tr> | |
</table> | |
<table cellspacing="5" cellpadding="0" border="0"> | |
<tr> | |
<td> | |
| |
</td> | |
<td> | |
<p> | |
</td> | |
</tr> | |
</table> | |
<a class="anchor" name="ee5023c29cca9dc68164b22a01cb7c6e"></a><!-- doxytag: member="log4cxx::filter::StringMatchFilter::setOption" ref="ee5023c29cca9dc68164b22a01cb7c6e" args="(const LogString &option, const LogString &value)" --><p> | |
<table class="mdTable" cellpadding="2" cellspacing="0"> | |
<tr> | |
<td class="mdRow"> | |
<table cellpadding="0" cellspacing="0" border="0"> | |
<tr> | |
<td class="md" nowrap valign="top">virtual void setOption </td> | |
<td class="md" valign="top">( </td> | |
<td class="md" nowrap valign="top">const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> & </td> | |
<td class="mdname" nowrap> <em>option</em>, </td> | |
</tr> | |
<tr> | |
<td class="md" nowrap align="right"></td> | |
<td class="md"></td> | |
<td class="md" nowrap>const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> & </td> | |
<td class="mdname" nowrap> <em>value</em></td> | |
</tr> | |
<tr> | |
<td class="md"></td> | |
<td class="md">) </td> | |
<td class="md" colspan="2"><code> [virtual]</code></td> | |
</tr> | |
</table> | |
</td> | |
</tr> | |
</table> | |
<table cellspacing="5" cellpadding="0" border="0"> | |
<tr> | |
<td> | |
| |
</td> | |
<td> | |
<p> | |
Set options. | |
<p> | |
<p> | |
Reimplemented from <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#c1d269357907e0809687a2bec962e1c8">Filter</a>. </td> | |
</tr> | |
</table> | |
<a class="anchor" name="162e26535f52ca245084a459213ce7b6"></a><!-- doxytag: member="log4cxx::filter::StringMatchFilter::setStringToMatch" ref="162e26535f52ca245084a459213ce7b6" args="(const LogString &stringToMatch1)" --><p> | |
<table class="mdTable" cellpadding="2" cellspacing="0"> | |
<tr> | |
<td class="mdRow"> | |
<table cellpadding="0" cellspacing="0" border="0"> | |
<tr> | |
<td class="md" nowrap valign="top">void setStringToMatch </td> | |
<td class="md" valign="top">( </td> | |
<td class="md" nowrap valign="top">const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> & </td> | |
<td class="mdname1" valign="top" nowrap> <em>stringToMatch1</em> </td> | |
<td class="md" valign="top"> ) </td> | |
<td class="md" nowrap><code> [inline]</code></td> | |
</tr> | |
</table> | |
</td> | |
</tr> | |
</table> | |
<table cellspacing="5" cellpadding="0" border="0"> | |
<tr> | |
<td> | |
| |
</td> | |
<td> | |
<p> | |
</td> | |
</tr> | |
</table> | |
<hr>The documentation for this class was generated from the following file:<ul> | |
<li><a class="el" href="stringmatchfilter_8h.html">stringmatchfilter.h</a></ul> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software | |
distributed under the License is distributed on an "AS IS" BASIS, | |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | |
limitations under the License. | |
--> | |
</BODY> | |
</HTML> |