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/28 07:08:34 UTC
svn commit: r808756 - in /incubator/log4php/trunk/src/site:
apt/docs/appender-threshold.apt site.xml
Author: grobmeier
Date: Fri Aug 28 05:08:33 2009
New Revision: 808756
URL: http://svn.apache.org/viewvc?rev=808756&view=rev
Log:
added threshold docs
Added:
incubator/log4php/trunk/src/site/apt/docs/appender-threshold.apt
Modified:
incubator/log4php/trunk/src/site/site.xml
Added: incubator/log4php/trunk/src/site/apt/docs/appender-threshold.apt
URL: http://svn.apache.org/viewvc/incubator/log4php/trunk/src/site/apt/docs/appender-threshold.apt?rev=808756&view=auto
==============================================================================
--- incubator/log4php/trunk/src/site/apt/docs/appender-threshold.apt (added)
+++ incubator/log4php/trunk/src/site/apt/docs/appender-threshold.apt Fri Aug 28 05:08:33 2009
@@ -0,0 +1,71 @@
+~~ 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 Threshhold
+ ------
+ ------
+ ------
+
+Apache Log4php Appender Threshhold
+
+ A threshold is lets you filter out log events of a specified LoggerLevel on an
+ Appender-Level and on Configuration-Level. This is sometimes an easier option
+ than changing the LoggerLevel of the several components.
+
+ If you set a threshold, then every LoggerLevel which is greater or equal than
+ the threshold will be logged. For example, if you set WARN as threshold, then INFO
+ and DEBUG will not be logged, but ERROR and FATAL will.
+
+* Adding a threshold to Appenders
+
+ A threshold can be added to an appender in the property file like this:
+
++--
+log4php.appender.default = LoggerAppenderEcho
+log4php.appender.default.layout = LoggerLayoutSimple
+log4php.appender.default.threshold = WARN
++--
+
+ In a XML file it looks like this:
+
++--
+<appender threshold="INFO" name="blub" class="LoggerAppenderEcho">
+ <layout class="LoggerLayoutSimple"/>
+</appender>
++--
+
+* Adding a threshold on Configuration basis
+
+ If you specify a threshold on configuration basis, it will work for all appenders.
+ A threshold can be added to an appender in the property file like this:
+
++--
+log4php.threshold = WARN
+log4php.rootLogger = WARN, default, blub
++--
+
+ In a XML file it looks like this:
+
++--
+<log4php:configuration xmlns:log4php="http://logging.apache.org/log4php/" threshold="WARN">
+ <appender threshold="WARN" name="default" class="LoggerAppenderEcho">
+ <layout class="LoggerLayoutSimple"/>
+ </appender>
+ <root>
+ <level value="WARN" />
+ <appender_ref ref="default" />
+ </root>
+</log4php:configuration>
++--
\ No newline at end of file
Modified: incubator/log4php/trunk/src/site/site.xml
URL: http://svn.apache.org/viewvc/incubator/log4php/trunk/src/site/site.xml?rev=808756&r1=808755&r2=808756&view=diff
==============================================================================
--- incubator/log4php/trunk/src/site/site.xml (original)
+++ incubator/log4php/trunk/src/site/site.xml Fri Aug 28 05:08:33 2009
@@ -53,9 +53,10 @@
<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="Appender Threshold" href="/docs/appenders-threshhold.html"/>
+
<item name="Appender Filter" href="/docs/appenders-filter.html"/>
<item name="Layout" href="/docs/layout.html"/>
<item name="Renderer" href="/docs/renderer.html"/>