blob: c11cb2332e5541a53b3208adb3b156016ad4c532 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Apache log4cxx: Filter Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname"><a href="http://logging.apache.org/log4cxx">Apache log4cxx</a>
&#160;<span id="projectnumber">Version 0.10.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;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 class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classlog4cxx_1_1spi_1_1_filter.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classlog4cxx_1_1spi_1_1_filter-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">Filter Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>Users should extend this class to implement customized logging event filtering.
<a href="classlog4cxx_1_1spi_1_1_filter.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for Filter:</div>
<div class="dyncontent">
<div class="center">
<img src="classlog4cxx_1_1spi_1_1_filter.png" usemap="#Filter_map" alt=""/>
<map id="Filter_map" name="Filter_map">
<area href="classlog4cxx_1_1spi_1_1_option_handler.html" title="A string based interface to configure package components. " alt="OptionHandler" shape="rect" coords="0,56,110,80"/>
<area href="classlog4cxx_1_1helpers_1_1_object_impl.html" title="Implementation class for Object. " alt="ObjectImpl" shape="rect" coords="120,56,230,80"/>
<area href="classlog4cxx_1_1helpers_1_1_object.html" title="base class for java-like objects. " alt="Object" shape="rect" coords="0,0,110,24"/>
<area href="classlog4cxx_1_1helpers_1_1_object.html" title="base class for java-like objects. " alt="Object" shape="rect" coords="120,0,230,24"/>
<area href="classlog4cxx_1_1filter_1_1_and_filter.html" title="A filter that &#39;and&#39;s the results of any number of contained filters together. " alt="AndFilter" shape="rect" coords="180,168,290,192"/>
<area href="classlog4cxx_1_1filter_1_1_deny_all_filter.html" title="This filter drops all logging events. " alt="DenyAllFilter" shape="rect" coords="180,224,290,248"/>
<area href="classlog4cxx_1_1filter_1_1_expression_filter.html" title="A filter supporting complex expressions - supports both infix and postfix expressions (infix expressi..." alt="ExpressionFilter" shape="rect" coords="180,280,290,304"/>
<area href="classlog4cxx_1_1filter_1_1_level_match_filter.html" title="This is a very simple filter based on level matching. " alt="LevelMatchFilter" shape="rect" coords="180,336,290,360"/>
<area href="classlog4cxx_1_1filter_1_1_level_range_filter.html" title="This is a very simple filter based on level matching, which can be used to reject messages with prior..." alt="LevelRangeFilter" shape="rect" coords="180,392,290,416"/>
<area href="classlog4cxx_1_1filter_1_1_location_info_filter.html" title="Location information is usually specified at the appender level - all events associated with an appen..." alt="LocationInfoFilter" shape="rect" coords="180,448,290,472"/>
<area href="classlog4cxx_1_1filter_1_1_map_filter.html" alt="MapFilter" shape="rect" coords="180,504,290,528"/>
<area href="classlog4cxx_1_1filter_1_1_property_filter.html" title="NOTE: This filter modifies logging events by adding properties to the event. " alt="PropertyFilter" shape="rect" coords="180,560,290,584"/>
<area href="classlog4cxx_1_1filter_1_1_string_match_filter.html" title="This is a very simple filter based on string matching. " alt="StringMatchFilter" shape="rect" coords="180,616,290,640"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a8c8b0cee5b13b164894f9eedd8d78bcd"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a8c8b0cee5b13b164894f9eedd8d78bcd">FilterDecision</a> { <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a8c8b0cee5b13b164894f9eedd8d78bcda692e4d49cf7d68c58e78875ae1833fc3">DENY</a> = -1,
<a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a8c8b0cee5b13b164894f9eedd8d78bcdaf46d14eb9d5d71afc9f6e747689fcb56">NEUTRAL</a> = 0,
<a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a8c8b0cee5b13b164894f9eedd8d78bcda5707b7b8bf1b098d620552e9576d8061">ACCEPT</a> = 1
}</td></tr>
<tr class="separator:a8c8b0cee5b13b164894f9eedd8d78bcd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad724ba04cbde6118ceddbd6635e96eaa"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#ad724ba04cbde6118ceddbd6635e96eaa">Filter</a> ()</td></tr>
<tr class="separator:ad724ba04cbde6118ceddbd6635e96eaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0198815940c2715c84b0e04828cf8dfa"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a0198815940c2715c84b0e04828cf8dfa">addRef</a> () const </td></tr>
<tr class="separator:a0198815940c2715c84b0e04828cf8dfa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55c31efee1904916b999395fa4d46a24"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a55c31efee1904916b999395fa4d46a24">releaseRef</a> () const </td></tr>
<tr class="separator:a55c31efee1904916b999395fa4d46a24"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6ecf1ac8f2f77c59ec5bb44b702de4f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacelog4cxx_1_1spi.html#a2d59aaf291a3cb28e165f0912242da25">log4cxx::spi::FilterPtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#ac6ecf1ac8f2f77c59ec5bb44b702de4f">getNext</a> () const </td></tr>
<tr class="separator:ac6ecf1ac8f2f77c59ec5bb44b702de4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb980cf7b7dedc3e2678a5461ccc717e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#adb980cf7b7dedc3e2678a5461ccc717e">setNext</a> (const <a class="el" href="namespacelog4cxx_1_1spi.html#a2d59aaf291a3cb28e165f0912242da25">log4cxx::spi::FilterPtr</a> &amp;newNext)</td></tr>
<tr class="separator:adb980cf7b7dedc3e2678a5461ccc717e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3df68f8aae152299471992071e202f5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#aa3df68f8aae152299471992071e202f5">activateOptions</a> (<a class="el" href="classlog4cxx_1_1helpers_1_1_pool.html">log4cxx::helpers::Pool</a> &amp;p)</td></tr>
<tr class="memdesc:aa3df68f8aae152299471992071e202f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Usually filters options become active when set. <a href="#aa3df68f8aae152299471992071e202f5">More...</a><br /></td></tr>
<tr class="separator:aa3df68f8aae152299471992071e202f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1d269357907e0809687a2bec962e1c8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#ac1d269357907e0809687a2bec962e1c8">setOption</a> (const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;option, const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;value)</td></tr>
<tr class="memdesc:ac1d269357907e0809687a2bec962e1c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set <code>option</code> to <code>value</code>. <a href="#ac1d269357907e0809687a2bec962e1c8">More...</a><br /></td></tr>
<tr class="separator:ac1d269357907e0809687a2bec962e1c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19d7c150d72bb9a151180cb3ad9fcb90"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a8c8b0cee5b13b164894f9eedd8d78bcd">FilterDecision</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a19d7c150d72bb9a151180cb3ad9fcb90">decide</a> (const <a class="el" href="namespacelog4cxx_1_1spi.html#ab5abd68f0fb303c6d5f5f7d1ff49b3a6">LoggingEventPtr</a> &amp;event) const =0</td></tr>
<tr class="separator:a19d7c150d72bb9a151180cb3ad9fcb90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classlog4cxx_1_1spi_1_1_option_handler"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classlog4cxx_1_1spi_1_1_option_handler')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classlog4cxx_1_1spi_1_1_option_handler.html">OptionHandler</a></td></tr>
<tr class="memitem:ad773ac49843844af53fe553912ed63e5 inherit pub_methods_classlog4cxx_1_1spi_1_1_option_handler"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1spi_1_1_option_handler.html#ad773ac49843844af53fe553912ed63e5">~OptionHandler</a> ()</td></tr>
<tr class="separator:ad773ac49843844af53fe553912ed63e5 inherit pub_methods_classlog4cxx_1_1spi_1_1_option_handler"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classlog4cxx_1_1helpers_1_1_object"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classlog4cxx_1_1helpers_1_1_object')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classlog4cxx_1_1helpers_1_1_object.html">Object</a></td></tr>
<tr class="memitem:ae7b62e37794f297c0cede40ed0e84fcd inherit pub_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="classlog4cxx_1_1helpers_1_1_class.html">helpers::Class</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_object.html#ae7b62e37794f297c0cede40ed0e84fcd">getClass</a> () const </td></tr>
<tr class="separator:ae7b62e37794f297c0cede40ed0e84fcd inherit pub_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5cc4f9ba1ea5c2f25bc4b1f0dac5dc5 inherit pub_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_object.html#ab5cc4f9ba1ea5c2f25bc4b1f0dac5dc5">~Object</a> ()</td></tr>
<tr class="separator:ab5cc4f9ba1ea5c2f25bc4b1f0dac5dc5 inherit pub_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ab1bb19059c1de23f8a35cdbc0b6a5c inherit pub_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_object.html#a0ab1bb19059c1de23f8a35cdbc0b6a5c">instanceof</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1_class.html">Class</a> &amp;clazz) const =0</td></tr>
<tr class="separator:a0ab1bb19059c1de23f8a35cdbc0b6a5c inherit pub_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04b3422e17b0a882538bbc99833ab9df inherit pub_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memItemLeft" align="right" valign="top">virtual const void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_object.html#a04b3422e17b0a882538bbc99833ab9df">cast</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1_class.html">Class</a> &amp;clazz) const =0</td></tr>
<tr class="separator:a04b3422e17b0a882538bbc99833ab9df inherit pub_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classlog4cxx_1_1helpers_1_1_object_impl"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classlog4cxx_1_1helpers_1_1_object_impl')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classlog4cxx_1_1helpers_1_1_object_impl.html">ObjectImpl</a></td></tr>
<tr class="memitem:a5e6e9fc30dc1f098fee72d516ea0bad0 inherit pub_methods_classlog4cxx_1_1helpers_1_1_object_impl"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_object_impl.html#a5e6e9fc30dc1f098fee72d516ea0bad0">ObjectImpl</a> ()</td></tr>
<tr class="separator:a5e6e9fc30dc1f098fee72d516ea0bad0 inherit pub_methods_classlog4cxx_1_1helpers_1_1_object_impl"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb974728bb3cb991285140c1aa57eed7 inherit pub_methods_classlog4cxx_1_1helpers_1_1_object_impl"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_object_impl.html#abb974728bb3cb991285140c1aa57eed7">~ObjectImpl</a> ()</td></tr>
<tr class="separator:abb974728bb3cb991285140c1aa57eed7 inherit pub_methods_classlog4cxx_1_1helpers_1_1_object_impl"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_static_methods_classlog4cxx_1_1helpers_1_1_object"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classlog4cxx_1_1helpers_1_1_object')"><img src="closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="classlog4cxx_1_1helpers_1_1_object.html">Object</a></td></tr>
<tr class="memitem:a0bdbda4effe8938c1aca6d4397e5a39d inherit pub_static_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="classlog4cxx_1_1helpers_1_1_class.html">helpers::Class</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_object.html#a0bdbda4effe8938c1aca6d4397e5a39d">getStaticClass</a> ()</td></tr>
<tr class="separator:a0bdbda4effe8938c1aca6d4397e5a39d inherit pub_static_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50ec9288d0b7e3140dee8e24ee74a212 inherit pub_static_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="classlog4cxx_1_1helpers_1_1_class_registration.html">log4cxx::helpers::ClassRegistration</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_object.html#a50ec9288d0b7e3140dee8e24ee74a212">registerClass</a> ()</td></tr>
<tr class="separator:a50ec9288d0b7e3140dee8e24ee74a212 inherit pub_static_methods_classlog4cxx_1_1helpers_1_1_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_classlog4cxx_1_1helpers_1_1_object_impl"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classlog4cxx_1_1helpers_1_1_object_impl')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="classlog4cxx_1_1helpers_1_1_object_impl.html">ObjectImpl</a></td></tr>
<tr class="memitem:a88f2ae00c84f3f309965e6588ed158d4 inherit pro_attribs_classlog4cxx_1_1helpers_1_1_object_impl"><td class="memItemLeft" align="right" valign="top">unsigned int volatile&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_object_impl.html#a88f2ae00c84f3f309965e6588ed158d4">ref</a></td></tr>
<tr class="separator:a88f2ae00c84f3f309965e6588ed158d4 inherit pro_attribs_classlog4cxx_1_1helpers_1_1_object_impl"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Users should extend this class to implement customized logging event filtering. </p>
<p>Note that <a class="el" href="classlog4cxx_1_1_logger.html" title="This is the central class in the log4cxx package. ">Logger</a> and <a class="el" href="classlog4cxx_1_1_appender_skeleton.html" title="Implementation base class for all appenders. ">AppenderSkeleton</a>, the parent class of all standard appenders, have built-in filtering rules. It is suggested that you first use and understand the built-in rules before rushing to write your own custom filters.</p>
<p>This abstract class assumes and also imposes that filters be organized in a linear chain. The <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a19d7c150d72bb9a151180cb3ad9fcb90">decide(LoggingEvent)</a> method of each filter is called sequentially, in the order of their addition to the chain.</p>
<p>The <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a19d7c150d72bb9a151180cb3ad9fcb90">decide(LoggingEvent)</a> method must return one of the integer constants <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a8c8b0cee5b13b164894f9eedd8d78bcda692e4d49cf7d68c58e78875ae1833fc3" title="The log event must be dropped immediately without consulting with the remaining filters, if any, in the chain. ">DENY</a>, <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a8c8b0cee5b13b164894f9eedd8d78bcdaf46d14eb9d5d71afc9f6e747689fcb56" title="This filter is neutral with respect to the log event. ">NEUTRAL</a> or <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a8c8b0cee5b13b164894f9eedd8d78bcda5707b7b8bf1b098d620552e9576d8061" title="The log event must be logged immediately without consulting with the remaining filters, if any, in the chain. ">ACCEPT</a>.</p>
<p>If the value <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a8c8b0cee5b13b164894f9eedd8d78bcda692e4d49cf7d68c58e78875ae1833fc3" title="The log event must be dropped immediately without consulting with the remaining filters, if any, in the chain. ">DENY</a> is returned, then the log event is dropped immediately without consulting with the remaining filters.</p>
<p>If the value <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a8c8b0cee5b13b164894f9eedd8d78bcdaf46d14eb9d5d71afc9f6e747689fcb56" title="This filter is neutral with respect to the log event. ">NEUTRAL</a> is returned, then the next filter in the chain is consulted. If there are no more filters in the chain, then the log event is logged. Thus, in the presence of no filters, the default behaviour is to log all logging events.</p>
<p>If the value <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a8c8b0cee5b13b164894f9eedd8d78bcda5707b7b8bf1b098d620552e9576d8061" title="The log event must be logged immediately without consulting with the remaining filters, if any, in the chain. ">ACCEPT</a> is returned, then the log event is logged without consulting the remaining filters.</p>
<p>The philosophy of <a class="el" href="namespacelog4cxx.html">log4cxx</a> filters is largely inspired from the Linux ipchains.</p>
<p>Note that filtering is only supported by the <a class="el" href="classlog4cxx_1_1xml_1_1_d_o_m_configurator.html">DOMConfigurator</a>. </p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="a8c8b0cee5b13b164894f9eedd8d78bcd"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a8c8b0cee5b13b164894f9eedd8d78bcd">FilterDecision</a></td>
</tr>
</table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a8c8b0cee5b13b164894f9eedd8d78bcda692e4d49cf7d68c58e78875ae1833fc3"></a>DENY&#160;</td><td class="fielddoc">
<p>The log event must be dropped immediately without consulting with the remaining filters, if any, in the chain. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a8c8b0cee5b13b164894f9eedd8d78bcdaf46d14eb9d5d71afc9f6e747689fcb56"></a>NEUTRAL&#160;</td><td class="fielddoc">
<p>This filter is neutral with respect to the log event. </p>
<p>The remaining filters, if any, should be consulted for a final decision. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a8c8b0cee5b13b164894f9eedd8d78bcda5707b7b8bf1b098d620552e9576d8061"></a>ACCEPT&#160;</td><td class="fielddoc">
<p>The log event must be logged immediately without consulting with the remaining filters, if any, in the chain. </p>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ad724ba04cbde6118ceddbd6635e96eaa"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classlog4cxx_1_1spi_1_1_filter.html">Filter</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aa3df68f8aae152299471992071e202f5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void activateOptions </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classlog4cxx_1_1helpers_1_1_pool.html">log4cxx::helpers::Pool</a> &amp;&#160;</td>
<td class="paramname"><em>p</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Usually filters options become active when set. </p>
<p>We provide a</p>
<p>default do-nothing implementation for convenience. </p>
<p>Implements <a class="el" href="classlog4cxx_1_1spi_1_1_option_handler.html#af04d4bfbd66b46083b1aa042fdafbb06">OptionHandler</a>.</p>
</div>
</div>
<a class="anchor" id="a0198815940c2715c84b0e04828cf8dfa"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void addRef </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Reimplemented from <a class="el" href="classlog4cxx_1_1helpers_1_1_object_impl.html#a0198815940c2715c84b0e04828cf8dfa">ObjectImpl</a>.</p>
</div>
</div>
<a class="anchor" id="a19d7c150d72bb9a151180cb3ad9fcb90"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a8c8b0cee5b13b164894f9eedd8d78bcd">FilterDecision</a> decide </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="namespacelog4cxx_1_1spi.html#ab5abd68f0fb303c6d5f5f7d1ff49b3a6">LoggingEventPtr</a> &amp;&#160;</td>
<td class="paramname"><em>event</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>If the decision is <code>DENY</code>, then the event will be dropped. If the decision is <code>NEUTRAL</code>, then the next filter, if any, will be invoked. If the decision is ACCEPT then the event will be logged without consulting with other filters in the chain.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">event</td><td>The <a class="el" href="classlog4cxx_1_1spi_1_1_logging_event.html" title="The internal representation of logging events. ">LoggingEvent</a> to decide upon. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The decision of the filter. </dd></dl>
<p>Implemented in <a class="el" href="classlog4cxx_1_1filter_1_1_level_range_filter.html#af0945cde84b8648b7497a6140e91ac5c">LevelRangeFilter</a>, <a class="el" href="classlog4cxx_1_1filter_1_1_expression_filter.html#af0945cde84b8648b7497a6140e91ac5c">ExpressionFilter</a>, <a class="el" href="classlog4cxx_1_1filter_1_1_and_filter.html#af0945cde84b8648b7497a6140e91ac5c">AndFilter</a>, <a class="el" href="classlog4cxx_1_1filter_1_1_level_match_filter.html#af0945cde84b8648b7497a6140e91ac5c">LevelMatchFilter</a>, <a class="el" href="classlog4cxx_1_1filter_1_1_string_match_filter.html#af0945cde84b8648b7497a6140e91ac5c">StringMatchFilter</a>, <a class="el" href="classlog4cxx_1_1filter_1_1_location_info_filter.html#af0945cde84b8648b7497a6140e91ac5c">LocationInfoFilter</a>, <a class="el" href="classlog4cxx_1_1filter_1_1_property_filter.html#af0945cde84b8648b7497a6140e91ac5c">PropertyFilter</a>, <a class="el" href="classlog4cxx_1_1filter_1_1_deny_all_filter.html#acfc21839a1c2ec66d23e530636c17fca">DenyAllFilter</a>, and <a class="el" href="classlog4cxx_1_1filter_1_1_map_filter.html#af0945cde84b8648b7497a6140e91ac5c">MapFilter</a>.</p>
</div>
</div>
<a class="anchor" id="ac6ecf1ac8f2f77c59ec5bb44b702de4f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespacelog4cxx_1_1spi.html#a2d59aaf291a3cb28e165f0912242da25">log4cxx::spi::FilterPtr</a> getNext </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="a55c31efee1904916b999395fa4d46a24"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void releaseRef </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Reimplemented from <a class="el" href="classlog4cxx_1_1helpers_1_1_object_impl.html#a55c31efee1904916b999395fa4d46a24">ObjectImpl</a>.</p>
</div>
</div>
<a class="anchor" id="adb980cf7b7dedc3e2678a5461ccc717e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void setNext </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="namespacelog4cxx_1_1spi.html#a2d59aaf291a3cb28e165f0912242da25">log4cxx::spi::FilterPtr</a> &amp;&#160;</td>
<td class="paramname"><em>newNext</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="ac1d269357907e0809687a2bec962e1c8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void setOption </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&#160;</td>
<td class="paramname"><em>option</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&#160;</td>
<td class="paramname"><em>value</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set <code>option</code> to <code>value</code>. </p>
<p>The handling of each option depends on the <a class="el" href="classlog4cxx_1_1spi_1_1_option_handler.html" title="A string based interface to configure package components. ">OptionHandler</a> instance. Some options may become active immediately whereas other may be activated only when <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#aa3df68f8aae152299471992071e202f5" title="Usually filters options become active when set. ">activateOptions</a> is called. </p>
<p>Implements <a class="el" href="classlog4cxx_1_1spi_1_1_option_handler.html#a8f2ae2ded63f80c627269c99b20c19ee">OptionHandler</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="filter_8h.html">filter.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!--
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>