Sophie

Sophie

distrib > Fedora > 16 > x86_64 > by-pkgid > ef445f0ce4be1c28e0c51502e9156d24 > files > 279

log4cxx-devel-0.10.0-10.fc15.x86_64.rpm

<!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"/>
<title>Apache log4cxx: ExpressionFilter Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Apache log4cxx&#160;<span id="projectnumber">Version 0.10.0</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <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>
    </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>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('classlog4cxx_1_1filter_1_1_expression_filter.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<h1>ExpressionFilter Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="log4cxx::filter::ExpressionFilter" --><!-- doxytag: inherits="log4cxx::spi::Filter" -->
<p>A filter supporting complex expressions - supports both infix and postfix expressions (infix expressions must first be converted to postfix prior to processing).  
<a href="#_details">More...</a></p>

<p>Inherits <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html">log4cxx::spi::Filter</a>.</p>

<p><a href="classlog4cxx_1_1filter_1_1_expression_filter-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1filter_1_1_expression_filter.html#aea951331023241b9a60ad9ac8973c26f">ExpressionFilter</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1filter_1_1_expression_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><td class="mdescLeft">&#160;</td><td class="mdescRight">Usually filters options become active when set.  <a href="#aa3df68f8aae152299471992071e202f5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1filter_1_1_expression_filter.html#a4d08af4b32106d42358e5c125eb7cf4c">setExpression</a> (const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;expression)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1filter_1_1_expression_filter.html#a1a5daccc8d67fb81d159c7e5a972975c">getExpression</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1filter_1_1_expression_filter.html#af26afd851059fa9ea29e518a2a91c1dd">setConvertInFixToPostFix</a> (bool convertInFixToPostFix)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1filter_1_1_expression_filter.html#a9fd567461d5da34d9560e11d17a1d455">getConvertInFixToPostFix</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1filter_1_1_expression_filter.html#aca9512eb8af976ace7ab4d1ac3513aa3">setAcceptOnMatch</a> (bool acceptOnMatch)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1filter_1_1_expression_filter.html#a1570b78d22e1bc9fd62145ed47b1b9d7">getAcceptOnMatch</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><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_1filter_1_1_expression_filter.html#af0945cde84b8648b7497a6140e91ac5c">decide</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">spi::LoggingEventPtr</a> &amp;event) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a8c8b0cee5b13b164894f9eedd8d78bcdaf46d14eb9d5d71afc9f6e747689fcb56">log4cxx::spi::Filter#NEUTRAL</a> is there is no string match.  <a href="#af0945cde84b8648b7497a6140e91ac5c"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A filter supporting complex expressions - supports both infix and postfix expressions (infix expressions must first be converted to postfix prior to processing). </p>
<p>See <code>org.apache.log4j.chainsaw.LoggingEventFieldResolver.java</code> for the correct names for logging event fields used when building expressions.</p>
<p>See <code>org.apache.log4j.chainsaw.rule</code> package for a list of available rules which can be applied using the expression syntax.</p>
<p>See <code>org.apache.log4j.chainsaw.RuleFactory</code> for the symbols used to activate the corresponding rules.</p>
<p>NOTE: Grouping using parentheses is supported - all tokens must be separated by spaces, and operands which contain spaces are not yet supported.</p>
<p>Example:</p>
<p>In order to build a filter that displays all messages with infomsg-45 or infomsg-44 in the message, as well as all messages with a level of WARN or higher, build an expression using the LikeRule (supports ORO-based regular expressions) and the InequalityRule. <b> ( MSG LIKE infomsg-4[4,5] ) &amp;&amp; ( LEVEL &gt;= WARN ) </b></p>
<p>Three options are required: <b>Expression</b> - the expression to match <b>ConvertInFixToPostFix</b> - convert from infix to posfix (default true) <b>AcceptOnMatch</b> - true or false (default true)</p>
<p>Meaning of <b>AcceptToMatch</b>: If there is a match between the value of the Expression option and the <a class="el" href="classlog4cxx_1_1spi_1_1_logging_event.html">log4cxx::spi::LoggingEvent</a> and AcceptOnMatch is true, the <a class="el" href="classlog4cxx_1_1filter_1_1_expression_filter.html#af0945cde84b8648b7497a6140e91ac5c">decide</a> method returns <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a8c8b0cee5b13b164894f9eedd8d78bcda5707b7b8bf1b098d620552e9576d8061">log4cxx::spi::Filter#ACCEPT</a>.</p>
<p>If there is a match between the value of the Expression option and the <a class="el" href="classlog4cxx_1_1spi_1_1_logging_event.html">log4cxx::spi::LoggingEvent</a> and AcceptOnMatch is false, <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a8c8b0cee5b13b164894f9eedd8d78bcda692e4d49cf7d68c58e78875ae1833fc3">log4cxx::spi::Filter#DENY</a> is returned.</p>
<p>If there is no match, <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a8c8b0cee5b13b164894f9eedd8d78bcdaf46d14eb9d5d71afc9f6e747689fcb56">log4cxx::spi::Filter#NEUTRAL</a> is returned. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aea951331023241b9a60ad9ac8973c26f"></a><!-- doxytag: member="log4cxx::filter::ExpressionFilter::ExpressionFilter" ref="aea951331023241b9a60ad9ac8973c26f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classlog4cxx_1_1filter_1_1_expression_filter.html">ExpressionFilter</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aa3df68f8aae152299471992071e202f5"></a><!-- doxytag: member="log4cxx::filter::ExpressionFilter::activateOptions" ref="aa3df68f8aae152299471992071e202f5" args="(log4cxx::helpers::Pool &amp;p)" -->
<div class="memitem">
<div class="memproto">
      <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><code> [virtual]</code></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>Reimplemented from <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#aa3df68f8aae152299471992071e202f5">Filter</a>.</p>

</div>
</div>
<a class="anchor" id="af0945cde84b8648b7497a6140e91ac5c"></a><!-- doxytag: member="log4cxx::filter::ExpressionFilter::decide" ref="af0945cde84b8648b7497a6140e91ac5c" args="(const spi::LoggingEventPtr &amp;event) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><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="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">spi::LoggingEventPtr</a> &amp;&#160;</td>
          <td class="paramname"><em>event</em></td><td>)</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a8c8b0cee5b13b164894f9eedd8d78bcdaf46d14eb9d5d71afc9f6e747689fcb56">log4cxx::spi::Filter#NEUTRAL</a> is there is no string match. </p>

<p>Implements <a class="el" href="classlog4cxx_1_1spi_1_1_filter.html#a88283dec47599dde698374489126f01c">Filter</a>.</p>

</div>
</div>
<a class="anchor" id="a1570b78d22e1bc9fd62145ed47b1b9d7"></a><!-- doxytag: member="log4cxx::filter::ExpressionFilter::getAcceptOnMatch" ref="a1570b78d22e1bc9fd62145ed47b1b9d7" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool getAcceptOnMatch </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a9fd567461d5da34d9560e11d17a1d455"></a><!-- doxytag: member="log4cxx::filter::ExpressionFilter::getConvertInFixToPostFix" ref="a9fd567461d5da34d9560e11d17a1d455" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool getConvertInFixToPostFix </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a1a5daccc8d67fb81d159c7e5a972975c"></a><!-- doxytag: member="log4cxx::filter::ExpressionFilter::getExpression" ref="a1a5daccc8d67fb81d159c7e5a972975c" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> getExpression </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aca9512eb8af976ace7ab4d1ac3513aa3"></a><!-- doxytag: member="log4cxx::filter::ExpressionFilter::setAcceptOnMatch" ref="aca9512eb8af976ace7ab4d1ac3513aa3" args="(bool acceptOnMatch)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setAcceptOnMatch </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>acceptOnMatch</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="af26afd851059fa9ea29e518a2a91c1dd"></a><!-- doxytag: member="log4cxx::filter::ExpressionFilter::setConvertInFixToPostFix" ref="af26afd851059fa9ea29e518a2a91c1dd" args="(bool convertInFixToPostFix)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setConvertInFixToPostFix </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>convertInFixToPostFix</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a4d08af4b32106d42358e5c125eb7cf4c"></a><!-- doxytag: member="log4cxx::filter::ExpressionFilter::setExpression" ref="a4d08af4b32106d42358e5c125eb7cf4c" args="(const LogString &amp;expression)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setExpression </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespacelog4cxx.html#ad7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&#160;</td>
          <td class="paramname"><em>expression</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="expressionfilter_8h.html">expressionfilter.h</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespacelog4cxx.html">log4cxx</a>      </li>
      <li class="navelem"><a class="el" href="namespacelog4cxx_1_1filter.html">filter</a>      </li>
      <li class="navelem"><a class="el" href="classlog4cxx_1_1filter_1_1_expression_filter.html">ExpressionFilter</a>      </li>
<!--
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>