You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-dev@logging.apache.org by gr...@apache.org on 2009/08/30 11:08:01 UTC

svn commit: r809283 - in /incubator/log4php/trunk/src/site: apt/docs/appender-filter.apt site.xml

Author: grobmeier
Date: Sun Aug 30 09:08:01 2009
New Revision: 809283

URL: http://svn.apache.org/viewvc?rev=809283&view=rev
Log:
added filter docs part 1

Added:
    incubator/log4php/trunk/src/site/apt/docs/appender-filter.apt
Modified:
    incubator/log4php/trunk/src/site/site.xml

Added: incubator/log4php/trunk/src/site/apt/docs/appender-filter.apt
URL: http://svn.apache.org/viewvc/incubator/log4php/trunk/src/site/apt/docs/appender-filter.apt?rev=809283&view=auto
==============================================================================
--- incubator/log4php/trunk/src/site/apt/docs/appender-filter.apt (added)
+++ incubator/log4php/trunk/src/site/apt/docs/appender-filter.apt Sun Aug 30 09:08:01 2009
@@ -0,0 +1,77 @@
+~~ 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.
+ ------
+ Apache log4php Appender Filter
+ ------
+ ------
+ ------
+
+Filtering Messages
+
+  Filtering is a mechanism to configure enhanced logging. For example, filter enable you to
+  log debug statements into the one appender and info into the other.
+  Or, if you want to log only certain statements with a defined regex into one specified file,
+  this can also be done with filters.
+  
+  Currently filters are only enabled for the XML configuration.If you need complex features,
+  than you better go with XML instead of property files.
+  
+* Configuring 
+
+  Here is an configuration example:
+  
++--
+<log4php:configuration xmlns:log4php="http://logging.apache.org/log4php/" threshold="WARN">
+    <appender threshold="INFO" name="blub" class="LoggerAppenderEcho">
+        <layout class="LoggerLayoutSimple"/>
+        <filter class="LoggerFilterLevelRange">
+			<param name="LevelMin" value="debug" />
+			<param name="LevelMax" value="debug" />
+		</filter>
+		<filter class="LoggerFilterDenyAll" />
+    </appender>
+    <root>
+        <level value="WARN" />
+        <appender_ref ref="blub" />
+    </root>
+</log4php:configuration>
++--
+  
+  This confiuration adds two filters to the appender. One is the LevelRange appender.
+  As you can see, there are more than one filters possible. Log4PHP builds up a so called
+  filter chain. That means, that after the LevelRange filter, the DenyAll-Filter is beeing
+  processed.
+  
+  As the names are suggesting, this configuration would enable logging for the debug level only.
+  All other messages will be denied.
+
+* The filter
+
+** LoggerFilterDenyAll
+  
+  TODO
+  
+** LoggerFilterLevelMatch
+  
+  TODO
+ 
+** LoggerFilterLevelRange
+  
+  TODO
+  
+** LoggerFilterStringMatch
+  
+  TODO
+  

Modified: incubator/log4php/trunk/src/site/site.xml
URL: http://svn.apache.org/viewvc/incubator/log4php/trunk/src/site/site.xml?rev=809283&r1=809282&r2=809283&view=diff
==============================================================================
--- incubator/log4php/trunk/src/site/site.xml (original)
+++ incubator/log4php/trunk/src/site/site.xml Sun Aug 30 09:08:01 2009
@@ -53,7 +53,8 @@
 			<item name="Introduction" href="/docs/introduction.html"/>
 			<item name="Configuration" href="/docs/configuration.html"/>
 			<item name="Appender" href="/docs/appenders.html"/>
-			<item name="Appender Threshold" href="/docs/appender-threshold.html"/>
+			<item name="Threshold" href="/docs/appender-threshold.html"/>
+			<item name="Filter" href="/docs/appender-filter.html"/>
 			<item name="Performance" href="/docs/performance.html"/>
             <!--