logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ihabu...@apache.org
Subject svn commit: r1186629 [4/5] - in /logging/log4php/trunk/src/site: ./ apt/ apt/docs/ apt/docs/appender/ resources/css/ resources/images/ resources/images/logos/ resources/js/ xdoc/ xdoc/docs/ xdoc/docs/appenders/ xdoc/docs/layouts/
Date Thu, 20 Oct 2011 06:53:50 GMT
Added: logging/log4php/trunk/src/site/xdoc/changelog.xml
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/site/xdoc/changelog.xml?rev=1186629&view=auto
==============================================================================
--- logging/log4php/trunk/src/site/xdoc/changelog.xml (added)
+++ logging/log4php/trunk/src/site/xdoc/changelog.xml Thu Oct 20 06:53:49 2011
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+	<properties>
+		<title>Releases</title>
+	</properties>
+
+	<body>
+		<section name="Releases">
+		
+			<macro name="toc">
+				<param name="fromDepth" value="2"/>
+			</macro>
+
+			<subsection name="Apache log4php v2.2.0" id="Apache_log4php_v2.2.0">
+				
+				<p>Release date: TBA</p>
+				<p><a href="changes-report.html#a2.2.0">JIRA change log</a></p>
+				
+				<!-- <strong>New features:</strong>
+				<ul>
+					<li></li>
+				</ul> -->
+				
+				<p><strong>Improvements:</strong></p>
+				<ul>
+					<li>Full rewrite of the configuration logic.</li>
+					<li>Improved documentation to include more XML and PHP configuration examples.</li>
+					<li>New web site appearance.</li>
+				</ul>
+				
+				<p><strong>Breaking changes:</strong></p>
+				<ul>
+					<li>Minor changes to PHP configuration format.</li>
+				</ul>
+			</subsection>
+
+			<subsection name="Apache log4php v2.1.0" id="Apache_log4php_v2.1.0">
+				
+				<p>Release date: 13.07.2011.</p>
+				<p><a href="changes-report.html#a2.1.0">JIRA change log</a></p>
+				
+				<strong>New features:</strong>
+				<ul>
+					<li>New logging level: TRACE</li>
+					<li>New appender: MongoDB (thanks to Vladimir Gorej)</li>
+				</ul>
+				
+				<p><strong>Improvements:</strong></p>
+				<ul>
+					<li>A lot of bugfixes</li>
+					<li>Most of the documentation has been rewritten</li>
+				</ul>
+			</subsection>
+		
+			<subsection name="Apache log4php v2.0.0" id="Apache_log4php_v2.0.0">
+				
+				<p>Release date: 12.12.2009.</p>
+				<p><a href="changes-report.html#a2.0.0">JIRA change log</a></p>
+				
+				<p>Apache log4php 2.0 is not compatible with the previous versions. Please have the following in mind 
+				when upgrading to log4php 2.0 in your project:</p>
+				
+				<ul>
+					<li>PHP 5.2+ is required</li>
+					<li>LoggerManager class has been removed. Use Logger instead.</li>
+					<li>LoggerHierarchy is not a singleton anymore by default.</li>
+					<li>logs to STDOUT by default</li>
+					<li>LOG4PHP_CONFIGURATION constant is no longer used. Please use Logger::configure() to configure 
+					log4php.</li>
+				</ul>
+			</subsection>
+		
+		</section>
+	</body>
+</document>

Added: logging/log4php/trunk/src/site/xdoc/docs/appenders.xml
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/site/xdoc/docs/appenders.xml?rev=1186629&view=auto
==============================================================================
--- logging/log4php/trunk/src/site/xdoc/docs/appenders.xml (added)
+++ logging/log4php/trunk/src/site/xdoc/docs/appenders.xml Thu Oct 20 06:53:49 2011
@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+	<properties>
+		<title>Appenders</title>
+	</properties>
+
+	<body>
+		<section name="Appenders">
+		
+			<p>Logging requests can be sent to multiple destinations, such as files, databases, syslog and others. 
+			Such destinations are called appenders. Appenders are attached to <a href="loggers.html">loggers</a>
+			and each logger can have multiple attached appenders.</p>
+			
+			<subsection name="Appender reference" id="Appender_reference">
+				
+				<p>The following appender classes are available:</p>
+			
+				<table>
+					<thead>
+						<tr>
+							<th>Name</th>
+							<th>Destination</th>
+						</tr>
+					</thead>
+					<tbody>
+						<tr>
+							<td><a href="appenders/console.html">LoggerAppenderConsole</a></td>
+							<td>Console, directly to the stdout or stderr stream.</td>
+						</tr>
+						<tr>
+							<td><a href="appenders/echo.html">LoggerAppenderEcho</a></td>
+							<td>Console, using the PHP <code>echo</code> command.</td>
+						</tr>
+						<tr>
+							<td><a href="appenders/file.html">LoggerAppenderFile</a></td>
+							<td>A file.</td>
+						</tr>
+						<tr>
+							<td><a href="appenders/daily-file.html">LoggerAppenderDailyFile</a></td>
+							<td>A file (new file each day).</td>
+						</tr>
+						<tr>
+							<td><a href="appenders/rolling-file.html">LoggerAppenderRollingFile</a></td>
+							<td>A file (new file when a specified size has been reached). </td>
+						</tr>
+						<tr>
+							<td><a href="appenders/mail.html">LoggerAppenderMail</a></td>
+							<td>Sends the log via email. The entire log is sent in one email.</td>
+						</tr>
+						<tr>
+							<td><a href="appenders/mail-event.html">LoggerAppenderMailEvent</a></td>
+							<td>Sends the log via email. Each log entry is sent in individual emails.</td>
+						</tr>
+						<tr>
+							<td><a href="appenders/mongodb.html">LoggerAppenderMongoDB</a></td>
+							<td>MongoDB.</td>
+						</tr>
+						<tr>
+							<td><a href="appenders/null.html">LoggerAppenderNull</a></td>
+							<td>Ignores all log events.</td>
+						</tr>
+						<tr>
+							<td><a href="appenders/pdo.html">LoggerAppenderPDO</a></td>
+							<td>Database.</td>
+						</tr>
+						<tr>
+							<td><a href="appenders/php.html">LoggerAppenderPhp</a></td>
+							<td>Creates a PHP user-level message using the PHP <code>trigger_error()</code> function.</td>
+						</tr>
+						<tr>
+							<td><a href="appenders/socket.html">LoggerAppenderSocket</a></td>
+							<td>A network socket.</td>
+						</tr>
+						<tr>
+							<td><a href="appenders/syslog.html">LoggerAppenderSyslog</a></td>
+							<td>Syslog.</td>
+						</tr>
+						
+					</tbody>
+				</table>
+			
+			</subsection>
+
+			
+			<subsection name="Configuring appenders" id="Configuring_appenders">
+			
+				<p>The following configuration shows how to configure an appender which logs to a file:</p>
+			
+<pre class="prettyprint"><![CDATA[
+<configuration xmlns="http://logging.apache.org/log4php/">
+    <appender name="default" class="LoggerAppenderFile">
+        <layout class="LoggerLayoutTTCC" />
+        <param name="file" value="/var/log/my.log" />
+        <param name="append" value="true" />
+    </appender>
+    <root>
+        <appender_ref ref="default" />
+    </root>
+</configuration>
+]]></pre>
+
+				<p>From the configuration you can see that an appender has the following properties:</p>
+	
+				<ul>
+					<li>A <strong>name</strong> which uniquely identifies it, in this case <em>default</em>.</li>
+					<li>A <strong>class</strong> which specifies which appender class will be used to handle the 
+					requests. Since we wish to log to a file, <code>LoggerAppenderFile</code> is used in this case.</li>
+					<li>A <strong>layout</strong> which transforms the logging events to string which can be logged.
+					A layout is required by most appenders, but some do not require it, such as the database appender.</li>
+					<li>Zero or more <strong>parameters</strong> (also called options) which configure the appender 
+					behaviour. In this example, the <em>file</em> parameter governs the path to the file which will be
+					used for logging, and <em>append</em> defines that log messages should be appended to the file,
+					instead of truncating it.</li>
+				</ul>			
+				
+			</subsection>
+			
+			<subsection name="Linking appenders to loggers">
+				
+				<p>A logger can be linked to one or more appenders. Also, multiple loggers can share the same 
+				appender.</p>
+				
+				<p>Consider the following configuration:</p>
+			
+<pre class="prettyprint"><![CDATA[
+<log4php:configuration xmlns:log4php="http://logging.apache.org/log4php/">
+    <appender name="primus" class="LoggerAppenderConsole" />
+    <appender name="secundus" class="LoggerAppenderFile">
+        <param name="file" value="/var/log/my.log" />
+    </appender>
+    <logger name="main">
+        <appender_ref ref="primus" />
+        <appender_ref ref="secundus" />
+    </logger>
+    <logger name="alternative">
+        <appender_ref ref="primus" />
+    </logger>
+</log4php:configuration>
+]]></pre>
+			
+				<p>This configures two appenders, called <em>primus</em> and <em>secundus</em>, and two loggers named
+				<em>main</em> and <em>alternative</em>. The logger <em>main</em> is linked to <em>primus</em> and 
+				<em>secundus</em> and will therefore forward logging events to both of them. In other words,
+				it will log both to console and to a file. Logger <em>alternative</em> is only linked to appender
+				<em>primus</em> and will therefore only log to the console.</p>  
+			
+			</subsection>
+			
+			
+			<subsection name="Appender threshold">
+			
+				<p>An appender can be assigned a threshold level. All logging requests with level lower than this threshold
+				will be ignored.</p>
+				
+				<p>For example, if you set <code>WARN</code> as a threshold, then <code>INFO</code>, <code>DEBUG</code>
+				and <code>TRACE</code> level events recieved by the appender will not be logged, but <code>WARN</code>,
+				<code>ERROR</code> and <code>FATAL</code> will.</p>
+				
+				<p>An example of setting an appender threshold:</p>
+				
+<pre class="prettyprint"><![CDATA[
+<configuration xmlns="http://logging.apache.org/log4php/">
+    <appender name="default" class="LoggerAppenderEcho" threshold="WARN" />
+    <root>
+        <appender_ref ref="default" />
+    </root>
+</configuration>
+]]></pre>
+			</subsection>
+		</section>
+	</body>
+</document>

Added: logging/log4php/trunk/src/site/xdoc/docs/appenders/console.xml
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/site/xdoc/docs/appenders/console.xml?rev=1186629&view=auto
==============================================================================
--- logging/log4php/trunk/src/site/xdoc/docs/appenders/console.xml (added)
+++ logging/log4php/trunk/src/site/xdoc/docs/appenders/console.xml Thu Oct 20 06:53:49 2011
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+	<properties>
+ 		<title>LoggerAppenderConsole</title>
+	</properties>
+
+	<body>
+		<section name="LoggerAppenderConsole">
+		
+			<p><code>LoggerAppenderConsole</code> writes logging events to the <code>php://stdout</code> or 
+			the <code>php://stderr</code> stream, the former being the default target.</p>
+			
+			<subsection name="Options">
+				<p>The following options are available:</p>
+		
+				<table>
+					<tr>
+						<th>Option</th>
+						<th>Type</th>
+						<th>Required</th>
+						<th>Default</th>
+						<th>Description</th>
+					</tr>
+					<tr>
+						<td>target</td>
+						<td>string</td>
+						<td>No</td>
+						<td>stdout</td>
+						<td>The stream to write to; either "stdout" or "stderr".</td>
+					</tr>
+				</table>
+				
+			</subsection>
+				
+			<subsection name="Examples">
+			
+				<p>This example shows how to configure <code>LoggerAppenderConsole</code>.</p>
+				
+				<p>XML configuration:</p>
+					
+<pre class="prettyprint"><![CDATA[
+<configuration xmlns="http://logging.apache.org/log4php/">
+    <appender name="default" class="LoggerAppenderConsole">
+        <layout class="LoggerLayoutTTCC" />
+    </appender>
+    <root>
+        <appender_ref ref="default" />
+    </root>
+</configuration>
+]]></pre>
+
+				<p>Equivalent PHP configuration:</p>
+				
+<pre class="prettyprint"><![CDATA[
+array(
+    'appenders' => array(
+        'default' => array(
+            'class' => 'LoggerAppenderConsole',
+            'layout' => array(
+                'class' => 'LoggerLayoutTTCC',
+            ),
+        ),
+    ),
+    'rootLogger' => array(
+        'appenders' => array('default'),
+    ),
+);
+]]></pre>
+			</subsection>
+		</section>
+	</body>
+</document>

Added: logging/log4php/trunk/src/site/xdoc/docs/appenders/daily-file.xml
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/site/xdoc/docs/appenders/daily-file.xml?rev=1186629&view=auto
==============================================================================
--- logging/log4php/trunk/src/site/xdoc/docs/appenders/daily-file.xml (added)
+++ logging/log4php/trunk/src/site/xdoc/docs/appenders/daily-file.xml Thu Oct 20 06:53:49 2011
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+	<properties>
+		<title>LoggerAppenderDailyFile</title>
+	</properties>
+
+	<body>
+		<section name="LoggerAppenderDailyFile">
+		
+			<p><code>LoggerAppenderDailyFile</code> writes logging events to a file. The file is rolled over 
+			once a day. In other words, for each day a new file is created.</p>
+			
+			<p>The path specified in the <code>file</code> option string should contain the string <code>%s</code> 
+			which will be substituted with the current date when logging. The <code>datePattern</code> option 
+			determines how the date will be formatted.</p>
+			
+			<subsection name="Options">
+				<p>The following options are available:</p>
+		
+				<table>
+					<tr>
+						<th>Option</th>
+						<th>Type</th>
+						<th>Required</th>
+						<th>Default</th>
+						<th>Description</th>
+					</tr>
+					<tr>
+						<td>file</td>
+						<td>string</td>
+						<td><strong>Yes</strong></td>
+						<td>-</td>
+						<td>Path to the target file. Should contain a <code>%s</code> which gets substituted by the 
+						date.</td>
+					</tr>
+					<tr>
+						<td>append</td>
+						<td>boolean</td>
+						<td>No</td>
+						<td>true</td>
+						<td>If set to true, the appender will append to the file, otherwise the file contents will be 
+						overwritten.</td>
+					</tr>
+					<tr>
+						<td>datePattern</td>
+						<td>string</td>
+						<td>No</td>
+						<td>Ymd</td>
+						<td>Format for the date in the file path, follows formatting rules used by the PHP
+						<code><a href="http://php.net/manual/en/function.date.php">date()</a></code> function.</td>
+					</tr>
+					
+					
+				</table>
+				
+			</subsection>
+				
+			<subsection name="Examples">
+				
+				<p>This example shows how to configure <code>LoggerAppenderDailyFile</code>.</p>
+				
+				<p>The desired filename format is, for example <code>file-2011-10-01.log</code>, so the date format in 
+				PHP date() notation is <code>Y-m-d</code>.</p>
+				
+				<p>XML configuration:</p>
+					
+<pre class="prettyprint"><![CDATA[
+<configuration xmlns="http://logging.apache.org/log4php/">
+    <appender name="default" class="LoggerAppenderDailyFile">
+        <layout class="LoggerLayoutTTCC" />
+        <param name="file" value="file-%s.log" />
+        <param name="datePattern" value="Y-m-d" />
+    </appender>
+    <root>
+        <appender_ref ref="default" />
+    </root>
+</configuration>
+]]></pre>
+
+				<p>Equivalent PHP configuration:</p>
+				
+<pre class="prettyprint"><![CDATA[
+array(
+    'appenders' => array(
+        'default' => array(
+            'class' => 'LoggerAppenderDailyFile',
+            'layout' => array(
+                'class' => 'LoggerLayoutTTCC',
+            ),
+            'params' => array(
+                'datePattern' => 'Y-m-d',
+                'file' => 'file-%s.log',
+            ),
+        ),
+    ),
+    'rootLogger' => array(
+        'appenders' => array('default'),
+    ),
+);
+]]></pre>
+			</subsection>
+		</section>
+	</body>
+</document>

Added: logging/log4php/trunk/src/site/xdoc/docs/appenders/echo.xml
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/site/xdoc/docs/appenders/echo.xml?rev=1186629&view=auto
==============================================================================
--- logging/log4php/trunk/src/site/xdoc/docs/appenders/echo.xml (added)
+++ logging/log4php/trunk/src/site/xdoc/docs/appenders/echo.xml Thu Oct 20 06:53:49 2011
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+	<properties>
+		<title>LoggerAppenderEcho</title>
+	</properties>
+
+	<body>
+		<section name="LoggerAppenderEcho">
+		
+			<p><code>LoggerAppenderEcho</code> writes logging events using PHP's 
+			<code><a class="externalLink" target="_blank" href="http://php.net/manual/en/function.echo.php">echo()</a>
+			</code> function. Echo outputs may be buffered.</p>
+		
+			<subsection name="Options">
+				<p>The following options are available:</p>
+		
+				<table>
+					<tr>
+						<th>Option</th>
+						<th>Type</th>
+						<th>Required</th>
+						<th>Default</th>
+						<th>Description</th>
+					</tr>
+					<tr>
+						<td>htmlLineBreaks</td>
+						<td>boolean</td>
+						<td>No</td>
+						<td>false</td>
+						<td>If set to true, a <![CDATA[<br />]]> element will be inserted before each line break in 
+						the logged message.</td>
+					</tr>
+				</table>
+				
+			</subsection>
+				
+			<subsection name="Examples">
+				<p>This example shows how to configure <code>LoggerAppenderEcho</code> using the 
+				<a href="../layouts/ttcc.html">TTCC layout</a> with	<code>htmlLineBreaks</code> turned on.</p>
+				
+				<p>XML configuration:</p>
+					
+<pre class="prettyprint"><![CDATA[
+<configuration xmlns="http://logging.apache.org/log4php/">
+    <appender name="default" class="LoggerAppenderEcho">
+        <layout class="LoggerLayoutTTCC" />
+        <param name="htmlLineBreaks" value="true" />
+    </appender>
+    <root>
+        <appender_ref ref="default" />
+    </root>
+</configuration>
+]]></pre>
+
+				<p>Equivalent PHP configuration:</p>
+				
+<pre class="prettyprint"><![CDATA[
+array(
+    'appenders' => array(
+        'default' => array(
+            'class' => 'LoggerAppenderEcho',
+            'layout' => array(
+                'class' => 'LoggerLayoutTTCC',
+            ),
+            'params' => array(
+                'htmlLineBreaks' => 'true',
+            ),
+        ),
+    ),
+    'rootLogger' => array(
+        'appenders' => array('default'),
+    ),
+);
+]]></pre>
+			</subsection>
+		</section>
+	</body>
+</document>

Added: logging/log4php/trunk/src/site/xdoc/docs/appenders/file.xml
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/site/xdoc/docs/appenders/file.xml?rev=1186629&view=auto
==============================================================================
--- logging/log4php/trunk/src/site/xdoc/docs/appenders/file.xml (added)
+++ logging/log4php/trunk/src/site/xdoc/docs/appenders/file.xml Thu Oct 20 06:53:49 2011
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+	<properties>
+		<title>LoggerAppenderFile</title>
+	</properties>
+
+	<body>
+		<section name="LoggerAppenderFile">
+		
+			<p><code>LoggerAppenderFile</code> writes logging events to a file.</p>
+		
+			<subsection name="Options">
+				<p>The following options are available:</p>
+		
+				<table>
+					<tr>
+						<th>Option</th>
+						<th>Type</th>
+						<th>Required</th>
+						<th>Default</th>
+						<th>Description</th>
+					</tr>
+					<tr>
+						<td>file</td>
+						<td>string</td>
+						<td><strong>Yes</strong></td>
+						<td>-</td>
+						<td>Path to the target file. Relative paths are resolved based on the working directory.</td>
+					</tr>
+					<tr>
+						<td>append</td>
+						<td>boolean</td>
+						<td>No</td>
+						<td>true</td>
+						<td>If set to true, the appender will append to the file, otherwise the file contents will be 
+						overwritten.</td>
+					</tr>
+				</table>
+				
+			</subsection>
+				
+			<subsection name="Examples">
+				
+				<p>This example shows how to configure <code>LoggerAppenderFile</code> to write to <code>file.log</code>
+				and to overwrite any content present in the file. The target file will be created in the current 
+				working directory.</p>
+				
+				<p>It is also possible to specify an absolute path to the target file, such as 
+				<code>/var/log/file.log</code> or <code>D:/logs/file.log</code></p>
+				
+				<p>XML configuration:</p>
+					
+<pre class="prettyprint"><![CDATA[
+<configuration xmlns="http://logging.apache.org/log4php/">
+    <appender name="default" class="LoggerAppenderFile">
+        <layout class="LoggerLayoutTTCC" />
+        <param name="file" value="file.log" />
+        <param name="append" value="false" />
+    </appender>
+    <root>
+        <appender_ref ref="default" />
+    </root>
+</configuration>
+]]></pre>
+
+				<p>Equivalent PHP configuration:</p>
+				
+<pre class="prettyprint"><![CDATA[
+array(
+    'appenders' => array(
+        'default' => array(
+            'class' => 'LoggerAppenderFile',
+            'layout' => array(
+                'class' => 'LoggerLayoutTTCC',
+            ),
+            'params' => array(
+                'file' => 'file.log',
+                'append' => false
+            ),
+        ),
+    ),
+    'rootLogger' => array(
+        'appenders' => array('default'),
+    ),
+);
+]]></pre>
+			</subsection>
+		</section>
+	</body>
+</document>

Added: logging/log4php/trunk/src/site/xdoc/docs/appenders/mail-event.xml
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/site/xdoc/docs/appenders/mail-event.xml?rev=1186629&view=auto
==============================================================================
--- logging/log4php/trunk/src/site/xdoc/docs/appenders/mail-event.xml (added)
+++ logging/log4php/trunk/src/site/xdoc/docs/appenders/mail-event.xml Thu Oct 20 06:53:49 2011
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+	<properties>
+		<title>LoggerAppenderMailEvent</title>
+	</properties>
+
+	<body>
+		<section name="LoggerAppenderMailEvent">
+		
+			<p><code>LoggerAppenderMailEvent</code> appends individual log events via email.</p>
+			
+			<p>This appender is similar to <code><a href="mail.html">LoggerAppenderMail</a></code>, except that it 
+  			sends each each log event in an individual email message at the time when it occurs.</p>
+			
+			<subsection name="Options">
+				<p>The following options are available:</p>
+		
+				<table>
+					<tr>
+						<th>Option</th>
+						<th>Type</th>
+						<th>Required</th>
+						<th>Default</th>
+						<th>Description</th>
+					</tr>
+					<tr>
+						<td>to</td>
+						<td>string</td>
+						<td><strong>Yes</strong></td>
+						<td>-</td>
+						<td>Email address(es) to which the log will be sent. Multiple email addresses may be specified
+						by separating them with a comma.</td>
+					</tr>
+					<tr>
+						<td>from</td>
+						<td>string</td>
+						<td><strong>Yes</strong></td>
+						<td>-</td>
+						<td>Email address which will be used in the From field.</td>
+					</tr>
+					<tr>
+						<td>subject</td>
+						<td>string</td>
+						<td>No</td>
+						<td>Log4php Report</td>
+						<td>Subject of the email message.</td>
+					</tr>
+					<tr>
+						<td>smtpHost</td>
+						<td>string</td>
+						<td>No</td>
+						<td>ini_get('SMTP')</td>
+						<td>Used to override the SMTP server. <strong>Only works on Windows.</strong></td>
+					</tr>
+					<tr>
+						<td>port</td>
+						<td>integer</td>
+						<td>No</td>
+						<td>25</td>
+						<td>Used to override the default SMTP server port. <strong>Only works on Windows.</strong></td>
+					</tr>
+				</table>
+				
+			</subsection>
+				
+			<subsection name="Examples">
+				
+				<p>This example shows how to configure <code>LoggerAppenderMailEvent</code> to send the log to two email 
+				addresses.</p>
+				
+				<p>XML configuration:</p>
+					
+<pre class="prettyprint"><![CDATA[
+<configuration xmlns="http://logging.apache.org/log4php/">
+    <appender name="default" class="LoggerAppenderMailEvent">
+        <layout class="LoggerLayoutTTCC" />
+        <param name="to" value="foo@example.com,baz@example.com" />
+        <param name="from" value="logger@example.com" />
+    </appender>
+    <root>
+        <appender_ref ref="default" />
+    </root>
+</configuration>
+]]></pre>
+
+				<p>Equivalent PHP configuration:</p>
+				
+<pre class="prettyprint"><![CDATA[
+array(
+    'appenders' => array(
+        'default' => array(
+            'class' => 'LoggerAppenderMailEvent',
+            'layout' => array(
+                'class' => 'LoggerLayoutTTCC',
+            ),
+            'params' => array(
+                'to' => 'foo@example.com,baz@example.com',
+                'from' => 'logger@example.com'
+            ),
+        ),
+    ),
+    'rootLogger' => array(
+        'appenders' => array('default'),
+    ),
+);
+]]></pre>
+			</subsection>
+		</section>
+	</body>
+</document>

Added: logging/log4php/trunk/src/site/xdoc/docs/appenders/mail.xml
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/site/xdoc/docs/appenders/mail.xml?rev=1186629&view=auto
==============================================================================
--- logging/log4php/trunk/src/site/xdoc/docs/appenders/mail.xml (added)
+++ logging/log4php/trunk/src/site/xdoc/docs/appenders/mail.xml Thu Oct 20 06:53:49 2011
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+	<properties>
+		<title>LoggerAppenderMail</title>
+	</properties>
+
+	<body>
+		<section name="LoggerAppenderMail">
+		
+			<p><code>LoggerAppenderMail</code> appends log events via email.</p>
+			
+			<p>This appender does not send individual emails for each logging requests but will collect them in a 
+			buffer and send them all in a single email once the appender is closed (i.e. when the script exists). 
+			Because of this, it may not appropriate for long running scripts. In that case
+			<code><a href="mail-event.html">LoggerAppenderMailEvent</a></code> might be a better choice.</p>
+		
+			<p class="alert-message warning">When working in Windows, make sure that the <code>SMTP</code> and <code>smpt_port</code>
+			values in php.ini are set to the correct values for your email server (address and port).</p>
+			
+			<subsection name="Options">
+				<p>The following options are available:</p>
+		
+				<table>
+					<tr>
+						<th>Option</th>
+						<th>Type</th>
+						<th>Required</th>
+						<th>Default</th>
+						<th>Description</th>
+					</tr>
+					<tr>
+						<td>to</td>
+						<td>string</td>
+						<td><strong>Yes</strong></td>
+						<td>-</td>
+						<td>Email address(es) to which the log will be sent. Multiple email addresses may be specified
+						by separating them with a comma.</td>
+					</tr>
+					<tr>
+						<td>from</td>
+						<td>string</td>
+						<td><strong>Yes</strong></td>
+						<td>-</td>
+						<td>Email address which will be used in the From field.</td>
+					</tr>
+					<tr>
+						<td>subject</td>
+						<td>string</td>
+						<td>No</td>
+						<td>Log4php Report</td>
+						<td>Subject of the email message.</td>
+					</tr>
+				</table>
+				
+			</subsection>
+				
+			<subsection name="Examples">
+				
+				<p>This example shows how to configure <code>LoggerAppenderMail</code> to send the log to two email 
+				addresses.</p>
+				
+				<p>XML configuration:</p>
+					
+<pre class="prettyprint"><![CDATA[
+<configuration xmlns="http://logging.apache.org/log4php/">
+    <appender name="default" class="LoggerAppenderMail">
+        <layout class="LoggerLayoutTTCC" />
+        <param name="to" value="foo@example.com,baz@example.com" />
+        <param name="from" value="logger@example.com" />
+    </appender>
+    <root>
+        <appender_ref ref="default" />
+    </root>
+</configuration>
+]]></pre>
+
+				<p>Equivalent PHP configuration:</p>
+				
+<pre class="prettyprint"><![CDATA[
+array(
+    'appenders' => array(
+        'default' => array(
+            'class' => 'LoggerAppenderMail',
+            'layout' => array(
+                'class' => 'LoggerLayoutTTCC',
+            ),
+            'params' => array(
+                'to' => 'foo@example.com,baz@example.com',
+                'from' => 'logger@example.com'
+            ),
+        ),
+    ),
+    'rootLogger' => array(
+        'appenders' => array('default'),
+    ),
+);
+]]></pre>
+			</subsection>
+		</section>
+	</body>
+</document>

Added: logging/log4php/trunk/src/site/xdoc/docs/appenders/mongodb.xml
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/site/xdoc/docs/appenders/mongodb.xml?rev=1186629&view=auto
==============================================================================
--- logging/log4php/trunk/src/site/xdoc/docs/appenders/mongodb.xml (added)
+++ logging/log4php/trunk/src/site/xdoc/docs/appenders/mongodb.xml Thu Oct 20 06:53:49 2011
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+	<properties>
+		<title>LoggerAppenderMongoDB</title>
+	</properties>
+
+	<body>
+		<section name="LoggerAppenderMongoDB">
+		
+			<p><code>LoggerAppenderMongoDB</code> appends log events to a mongoDB instance.</p>
+			
+			<p><a href="http://www.mongodb.org/" target="_blank" class="externalLink">MongoDB</a> is a scalable, 
+			high-performance, open source, document-oriented database.</p>
+		
+			<subsection name="Options">
+				<p>The following options are available:</p>
+		
+				<table>
+					<tr>
+						<th>Option</th>
+						<th>Type</th>
+						<th>Required</th>
+						<th>Default</th>
+						<th>Description</th>
+					</tr>
+					<tr>
+						<td>host</td>
+						<td>string</td>
+						<td>No</td>
+						<td>mongodb://localhost</td>
+						<td>Server on which mongodb instance is located.</td>
+					</tr>
+					<tr>
+						<td>port</td>
+						<td>integer</td>
+						<td>No</td>
+						<td>27017</td>
+						<td>Port on which the instance is bound.</td>
+					</tr>
+					<tr>
+						<td>databaseName</td>
+						<td>string</td>
+						<td>No</td>
+						<td>log4php_mongodb</td>
+						<td>Name of the database to which to log.</td>
+					</tr>
+					<tr>
+						<td>collectionName</td>
+						<td>string</td>
+						<td>No</td>
+						<td>logs</td>
+						<td>Name of the target collection within the given database.</td>
+					</tr>
+					<tr>
+						<td>username</td>
+						<td>string</td>
+						<td>No</td>
+						<td>-</td>
+						<td>Username used to connect to the database.</td>
+					</tr>
+					<tr>
+						<td>password</td>
+						<td>string</td>
+						<td>No</td>
+						<td>-</td>
+						<td>Password used to connect to the database.</td>
+					</tr>
+					
+				</table>
+				
+			</subsection>
+				
+			<subsection name="Examples">
+				<p>This example shows how to configure <code>LoggerAppenderMongoDB</code> to log to a remote database.</p>
+				
+				<p>XML configuration:</p>
+					
+<pre class="prettyprint"><![CDATA[
+<configuration xmlns="http://logging.apache.org/log4php/">
+    <appender name="default" class="LoggerAppenderMongoDB">
+        <layout class="LoggerLayoutTTCC" />
+        <param name="host" value="mongodb://example.com" />
+        <param name="username" value="logger" />
+        <param name="password" value="secret" />
+    </appender>
+    <root>
+        <appender_ref ref="default" />
+    </root>
+</configuration>
+]]></pre>
+
+				<p>Equivalent PHP configuration:</p>
+				
+<pre class="prettyprint"><![CDATA[
+array(
+    'appenders' => array(
+        'default' => array(
+            'class' => 'LoggerAppenderMongoDB',
+            'layout' => array(
+                'class' => 'LoggerLayoutTTCC',
+            ),
+            'params' => array(
+                'host' => 'mongodb://example.com',
+                'username' => 'logger',
+                'password' => 'secret',
+            ),
+        ),
+    ),
+    'rootLogger' => array(
+        'appenders' => array('default'),
+    ),
+);
+]]></pre>
+			</subsection>
+		</section>
+	</body>
+</document>

Added: logging/log4php/trunk/src/site/xdoc/docs/appenders/null.xml
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/site/xdoc/docs/appenders/null.xml?rev=1186629&view=auto
==============================================================================
--- logging/log4php/trunk/src/site/xdoc/docs/appenders/null.xml (added)
+++ logging/log4php/trunk/src/site/xdoc/docs/appenders/null.xml Thu Oct 20 06:53:49 2011
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+	<properties>
+		<title>LoggerAppenderNull</title>
+	</properties>
+
+	<body>
+		<section name="LoggerAppenderNull">
+		
+			<p><code>LoggerAppenderNull</code> ignores all logging requests; it never outputs a message to any 
+			device.</p>
+			
+			<p>This appender does not use a layout and has no configurable options.</p>
+			
+			<subsection name="Examples">
+				
+				<p>XML configuration:</p>
+					
+<pre class="prettyprint"><![CDATA[
+<configuration xmlns="http://logging.apache.org/log4php/">
+    <appender name="default" class="LoggerAppenderNull" />
+    <root>
+        <appender_ref ref="default" />
+    </root>
+</configuration>
+]]></pre>
+
+				<p>Equivalent PHP configuration:</p>
+				
+<pre class="prettyprint"><![CDATA[
+array(
+    'appenders' => array(
+        'default' => array(
+            'class' => 'LoggerAppenderNull',
+        ),
+    ),
+    'rootLogger' => array(
+        'appenders' => array('default'),
+    ),
+);
+]]></pre>
+			</subsection>
+		</section>
+	</body>
+</document>

Added: logging/log4php/trunk/src/site/xdoc/docs/appenders/pdo.xml
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/site/xdoc/docs/appenders/pdo.xml?rev=1186629&view=auto
==============================================================================
--- logging/log4php/trunk/src/site/xdoc/docs/appenders/pdo.xml (added)
+++ logging/log4php/trunk/src/site/xdoc/docs/appenders/pdo.xml Thu Oct 20 06:53:49 2011
@@ -0,0 +1,255 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+	<properties>
+		<title>LoggerAppenderPDO</title>
+	</properties>
+
+	<body>
+		<section name="LoggerAppenderPDO">
+		
+			<p><code>LoggerAppenderPDO</code> appender logs to a database using the PHP's 
+			<a href="http://php.net/manual/en/book.pdo.php" target="_blank" class="externalLink">PDO extension</a>.</p>
+		
+			<subsection name="Options">
+				<p>The following options are available:</p>
+		
+				<table>
+					<thead>
+						<tr>
+							<th>Option</th>
+							<th>Type</th>
+							<th>Required</th>
+							<th>Default</th>
+							<th>Description</th>
+						</tr>
+					</thead>
+					<tbody>
+						<tr>
+							<td>dsn</td>
+							<td>string</td>
+							<td><strong>Yes</strong></td>
+							<td>-</td>
+							<td>The Data Source Name (DSN) used to connect to the database.</td>
+						</tr>
+						<tr>
+							<td>user</td>
+							<td>string</td>
+							<td><strong>Yes</strong></td>
+							<td>-</td>
+							<td>Username used to connect to the database.</td>
+						</tr>
+						<tr>
+							<td>password</td>
+							<td>string</td>
+							<td><strong>Yes</strong></td>
+							<td>-</td>
+							<td>Password used to connect to the database.</td>
+						</tr>
+						<tr>
+							<td>createTable</td>
+							<td>boolean</td>
+							<td>No</td>
+							<td>true</td>
+							<td>If set to true, the table will be created if it doesn't exist.</td>
+						</tr>
+						<tr>
+							<td>table</td>
+							<td>string</td>
+							<td>No</td>
+							<td>-</td>
+							<td>Name of the table to which log entries are be inserted.</td>
+						</tr>
+						<tr>
+							<td>insertSql</td>
+							<td>string</td>
+							<td>No</td>
+							<td><em><a href="#Advanced_configuration">see below</a></em></td>
+							<td>SQL query used to insert a log event.</td>
+						</tr>
+						<tr>
+							<td>insertPattern</td>
+							<td>string</td>
+							<td>No</td>
+							<td><em><a href="#Advanced_configuration">see below</a></em></td>
+							<td>A comma separated list of format strings used in conjunction with <code>insertSql</code> option.</td>
+						</tr>
+					</tbody>
+				</table>
+				
+				<p>Parameters <code>dsn</code>, <code>user</code> and <code>password</code> are used by PDO to connect to 
+				the database which will be used for logging. For available database drivers and corresponding DSN format, 
+				please see the <a href="http://www.php.net/manual/en/pdo.drivers.php" target="_blank" 
+				class="externalLink">PDO driver documentation</a>.</p>
+
+			</subsection>
+			
+			<subsection name="Advanced configuration" id="Advanced_configuration">
+				<p>Options <code>insertSql</code> and <code>insertPattern</code> can be used to change how events are 
+				inserted into the database. By manipulating them, it is possible to use a custom table structure to 
+				suit your needs.</p>
+			
+				<p class="alert-message warning">WARNING: Change these settings only if you are sure you know what you are doing.</p>
+			
+				<p>The default values of these options are:</p>
+				
+				<table>
+					<thead>
+						<tr>
+							<th>Option</th>
+							<th>Default value</th>
+						</tr>
+					</thead>
+					<tbody>
+						<tr>
+							<td>insertSql</td>
+							<td>INSERT INTO __TABLE__ (timestamp, logger, level, message, thread, file, line) VALUES (?, ?, ?, ?, ?, ?, ?)</td>
+						</tr>
+						<tr>
+							<td>insertPattern</td>
+							<td>%d,%c,%p,%m,%t,%F,%L</td>
+						</tr>
+					</tbody>
+				</table>
+			
+				<p>The string <em>__TABLE__</em> in <code>insertSql</code> will be replaced with the table name 
+				defined in <code>table</code>. Question marks in <code>insertSql</code> will be replaced by evaluated 
+				<code><a href="../layouts/pattern.html">LoggerPatternLayout</a></code> format strings defined in 
+				<code>insertPattern</code>. See <code><a href="../layouts/pattern.html">LoggerPatternLayout</a></code>
+				documentation for format string description.</p>
+			
+			</subsection>
+			
+				
+			<subsection name="Examples">
+			
+				<h4>Example 1</h4>
+			
+				<p>The simplest example is connecting to an SQLite database which does not require any 
+				authentication.</p> 
+				
+				<p>SQLite databases are contained in simple files and don't reuquire a server to run. This example will
+				log to the database contained in <code>/var/log/log.sqlite</code>. The database will be created if it 
+				doesn't already exist.</p>
+				
+				<p>XML configuration:</p>
+					
+<pre class="prettyprint"><![CDATA[
+<configuration xmlns="http://logging.apache.org/log4php/">
+    <appender name="default" class="LoggerAppenderPDO">
+        <param name="dsn" value="sqlite:/var/log/log.sqlite" />
+    </appender>
+    <root>
+        <appender_ref ref="default" />
+    </root>
+</configuration>
+]]></pre>
+
+				<p>Equivalent PHP configuration:</p>
+				
+<pre class="prettyprint"><![CDATA[
+array(
+    'appenders' => array(
+        'default' => array(
+            'class' => 'LoggerAppenderPDO',
+            'params' => array(
+                'dsn' => 'sqlite:/var/log/log.sqlite',
+            ),
+        ),
+    ),
+    'rootLogger' => array(
+        'appenders' => array('default'),
+    ),
+);
+]]></pre>
+				<h4>Example 2</h4>
+
+				<p>A slightly more complex example is connecting to a MySQL database which requires user credentials
+				to be provided. Additionally, a user-specified table name is used.</p>
+				
+				<p>For this example, MySQL server needs to be running on localhost, and needs to contain a database
+				named <code>logdb</code>. The log will be written to a table named <code>log_table</code>. The table
+				will be created if it doesn't already exist.</p>
+
+				<p>XML configuration:</p>
+					
+<pre class="prettyprint"><![CDATA[
+<configuration xmlns="http://logging.apache.org/log4php/">
+    <appender name="default" class="LoggerAppenderPDO">
+        <param name="dsn" value="mysql:host=localhost;dbname=logdb" />
+        <param name="user" value="root" />
+        <param name="password" value="secret" />
+        <param name="table" value="log_table" />
+    </appender>
+    <root>
+        <appender_ref ref="default" />
+    </root>
+</configuration>
+]]></pre>
+
+				<p>Equivalent PHP configuration:</p>
+				
+<pre class="prettyprint"><![CDATA[
+array(
+    'appenders' => array(
+        'default' => array(
+            'class' => 'LoggerAppenderPDO',
+            'params' => array(
+                'dsn' => 'mysql:host=localhost;dbname=logdb',
+                'user' => 'root',
+                'password' => 'secret',
+                'table' => 'log_table',
+            ),
+        ),
+    ),
+    'rootLogger' => array(
+        'appenders' => array('default'),
+    ),
+);
+]]></pre>
+
+				<p>This is an output sample retrieved from the MySQL database.</p>
+				
+<pre>
+    mysql> desc log_table;
++-----------+---------------+------+-----+---------+-------+
+| Field     | Type          | Null | Key | Default | Extra |
++-----------+---------------+------+-----+---------+-------+
+| timestamp | varchar(32)   | YES  |     | NULL    |       |
+| logger    | varchar(64)   | YES  |     | NULL    |       |
+| level     | varchar(32)   | YES  |     | NULL    |       |
+| message   | varchar(9999) | YES  |     | NULL    |       |
+| thread    | varchar(32)   | YES  |     | NULL    |       |
+| file      | varchar(255)  | YES  |     | NULL    |       |
+| line      | varchar(6)    | YES  |     | NULL    |       |
++-----------+---------------+------+-----+---------+-------+
+
+    mysql> SELECT * FROM log_table;
+ +-------------------------+--------+-------+--------------+--------+--------------+------+
+ | timestamp               | logger | level | message      | thread | file         | line |
+ +-------------------------+--------+-------+--------------+--------+--------------+------+
+ | 2011-10-02 19:36:07,935 | main   | INFO  | Hello World! | 21858  | /tmp/log.php | 24   |
+ +-------------------------+--------+-------+--------------+--------+--------------+------+
+</pre> 
+				
+			</subsection>
+		</section>
+	</body>
+</document>

Added: logging/log4php/trunk/src/site/xdoc/docs/appenders/php.xml
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/site/xdoc/docs/appenders/php.xml?rev=1186629&view=auto
==============================================================================
--- logging/log4php/trunk/src/site/xdoc/docs/appenders/php.xml (added)
+++ logging/log4php/trunk/src/site/xdoc/docs/appenders/php.xml Thu Oct 20 06:53:49 2011
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+	<properties>
+		<title>LoggerAppenderPhp</title>
+	</properties>
+
+	<body>
+		<section name="LoggerAppenderPhp">
+		
+			<p><code>LoggerAppenderPhp</code> logs events by creating a PHP user-level message using the PHP's
+			<code><a href="http://www.php.net/manual/en/function.trigger-error.php" target="_blank" 
+			class="externalLink">trigger_error()</a></code>function.</p>
+		
+			<p>The message type depends on the event's severity level:</p>
+			<ul>
+				<li><code>E_USER_NOTICE</code> when the event's level is equal to or less than INFO</li>
+				<li><code>E_USER_WARNING</code> when the event's level is equal to WARN</li>
+				<li><code>E_USER_ERROR</code> when the event's level is equal to or greater than ERROR</li>
+			</ul>
+			
+		
+			<subsection name="Options">
+				<p>This appender has no configurable parameters.</p>
+			</subsection>
+				
+			<subsection name="Examples">
+
+				<p>XML configuration:</p>
+					
+<pre class="prettyprint"><![CDATA[
+<configuration xmlns="http://logging.apache.org/log4php/">
+    <appender name="default" class="LoggerAppenderPhp">
+        <layout class="LoggerLayoutTTCC" />
+    </appender>
+    <root>
+        <appender_ref ref="default" />
+    </root>
+</configuration>
+]]></pre>
+
+				<p>Equivalent PHP configuration:</p>
+				
+<pre class="prettyprint"><![CDATA[
+array(
+    'appenders' => array(
+        'default' => array(
+            'class' => 'LoggerAppenderPhp',
+            'layout' => array(
+                'class' => 'LoggerLayoutTTCC',
+            ),
+        ),
+    ),
+    'rootLogger' => array(
+        'appenders' => array('default'),
+    ),
+);
+]]></pre>
+				
+			</subsection>
+		</section>
+	</body>
+</document>

Added: logging/log4php/trunk/src/site/xdoc/docs/appenders/rolling-file.xml
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/site/xdoc/docs/appenders/rolling-file.xml?rev=1186629&view=auto
==============================================================================
--- logging/log4php/trunk/src/site/xdoc/docs/appenders/rolling-file.xml (added)
+++ logging/log4php/trunk/src/site/xdoc/docs/appenders/rolling-file.xml Thu Oct 20 06:53:49 2011
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+	<properties>
+		<title>LoggerAppenderRollingFile</title>
+	</properties>
+
+	<body>
+		<section name="LoggerAppenderRollingFile">
+		
+			<p><code>LoggerAppenderRollingFile</code> writes logging events to a specified file. The file is rolled over 
+			after a specified size has been reached.</p>
+			
+			<p>For example, if logging to a file named <code>file.log</code>, when the file size reaches the specified 
+			size limit, the contents are archived in a file named <code>file.log.1</code> and <code>file.log</code>
+			is truncated. When the size limit is reached the second time, <code>file.log.1</code> is renamed to 
+			<code>file.log.2</code>; contents from <code>file.log</code> are archived to <code>file.log.1</code> and 
+			<code>file.log</code> is truncated</p>
+			
+			<p>This continues until the maximum backup index is reached, after which the oldest log file is deleted
+			on each rollover.</p>
+			
+			<subsection name="Options">
+				<p>The following options are available:</p>
+		
+				<table>
+					<tr>
+						<th>Option</th>
+						<th>Type</th>
+						<th>Required</th>
+						<th>Default</th>
+						<th>Description</th>
+					</tr>
+					<tr>
+						<td>file</td>
+						<td>string</td>
+						<td><strong>Yes</strong></td>
+						<td>-</td>
+						<td>Path to the target file. Should contain a <code>%s</code> which gets substituted by the 
+						date.</td>
+					</tr>
+					<tr>
+						<td>append</td>
+						<td>boolean</td>
+						<td>No</td>
+						<td>true</td>
+						<td>If set to true, the appender will append to the file, otherwise the file contents will be 
+						overwritten.</td>
+					</tr>
+					<tr>
+						<td>maxFileSize</td>
+						<td>string</td>
+						<td>No</td>
+						<td>10M</td>
+						<td>Maximum allowed file size (in bytes) before rolling over. Suffixes "KB", "MB" and "GB" are allowed. 10KB = 10240 bytes, etc.</td>
+					</tr>
+					<tr>
+						<td>maxBackupIndex</td>
+						<td>integer</td>
+						<td>No</td>
+						<td>1</td>
+						<td>Maximum number of backup files to keep.</td>
+					</tr>
+				</table>
+				
+			</subsection>
+				
+			<subsection name="Examples">
+				
+				<p>This example shows how to configure <code>LoggerAppenderRollingFile</code> to rollover after reaching
+				the size of 1MB and for keeping the last 5 backup files.</p>
+				
+				<p>XML configuration:</p>
+					
+<pre class="prettyprint"><![CDATA[
+<configuration xmlns="http://logging.apache.org/log4php/">
+    <appender name="default" class="LoggerAppenderRollingFile">
+        <layout class="LoggerLayoutTTCC" />
+        <param name="file" value="file.log" />
+        <param name="maxFileSize" value="1MB" />
+        <param name="maxBackupIndex" value="5" />
+    </appender>
+    <root>
+        <appender_ref ref="default" />
+    </root>
+</configuration>
+]]></pre>
+
+				<p>Equivalent PHP configuration:</p>
+				
+<pre class="prettyprint"><![CDATA[
+array(
+    'appenders' => array(
+        'default' => array(
+            'class' => 'LoggerAppenderRollingFile',
+            'layout' => array(
+                'class' => 'LoggerLayoutTTCC',
+            ),
+            'params' => array(
+                'file' => 'file.log',
+                'maxFileSize' => '1MB',
+                'maxBackupIndex' => 5,
+            ),
+        ),
+    ),
+    'rootLogger' => array(
+        'appenders' => array('default'),
+    ),
+);
+]]></pre>
+			</subsection>
+		</section>
+	</body>
+</document>

Added: logging/log4php/trunk/src/site/xdoc/docs/appenders/socket.xml
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/site/xdoc/docs/appenders/socket.xml?rev=1186629&view=auto
==============================================================================
--- logging/log4php/trunk/src/site/xdoc/docs/appenders/socket.xml (added)
+++ logging/log4php/trunk/src/site/xdoc/docs/appenders/socket.xml Thu Oct 20 06:53:49 2011
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+	<properties>
+		<title>LoggerAppenderSocket</title>
+	</properties>
+
+	<body>
+		<section name="LoggerAppenderSocket">
+		
+			<p><code>LoggerAppenderSocket</code> serializes log events and sends them to a network socket.</p>
+			
+			<p>This appender does not require a layout.</p>
+			
+			<subsection name="Options">
+				<p>The following options are available:</p>
+		
+				<table>
+					<thead>
+						<tr>
+							<th>Option</th>
+							<th>Type</th>
+							<th>Required</th>
+							<th>Default</th>
+							<th>Description</th>
+						</tr>
+					</thead>
+					<tbody>
+						<tr>
+							<td>remoteHost</td>
+							<td>string</td>
+							<td><strong>Yes</strong></td>
+							<td>-</td>
+							<td>Target host. On how to define a remote hostname see <code>
+							<a href="http://php.net/manual/en/function.fsockopen.php" class="externalLink" 
+							target="_blank">fsockopen()</a></code> documentation. </td>
+						</tr>
+						<tr>
+							<td>port</td>
+							<td>integer</td>
+							<td>No</td>
+							<td>4446</td>
+							<td>Target port of the socket.</td>
+						</tr>
+						<tr>
+							<td>timeout</td>
+							<td>integer</td>
+							<td>No</td>
+							<td>30</td>
+							<td>Timeout in ms.</td>
+						</tr>
+						<tr>
+							<td>useXml</td>
+							<td>boolean</td>
+							<td>No</td>
+							<td>false</td>
+							<td>If set to <em>true</em> the appender will sent the event formatted in XML. Otherwise, 
+							the appender will send the event as a serialized PHP object.</td>
+						</tr>
+						<tr>
+							<td>locationInfo</td>
+							<td>boolean</td>
+							<td>No</td>
+							<td>false</td>
+							<td>Whether location info is included for the XML event format. Ignored if XML format is not used.</td>
+						</tr>
+						<tr>
+							<td>log4jNamespace</td>
+							<td>boolean</td>
+							<td>No</td>
+							<td>false</td>
+							<td>In XML format, <code>log4php</code> namespace is used by default. If set to true, 
+							<code>log4j</code> namespace will be used instead.</td>
+						</tr>
+					</tbody>
+				</table>
+				
+			</subsection>
+				
+			<subsection name="Examples">
+				
+				<p>In this example, log events are sent to localhost:4242, using the serialized format. The host 
+				will recieve a serialized LoggerLoggingEvent object.</p>
+				
+				<p>XML configuration:</p>
+					
+<pre class="prettyprint"><![CDATA[
+<configuration xmlns="http://logging.apache.org/log4php/">
+    <appender name="default" class="LoggerAppenderSocket">
+        <param name="remoteHost" value="localhost" />
+        <param name="port" value="4242" />
+    </appender>
+    <root>
+        <appender_ref ref="default" />
+    </root>
+</configuration>
+]]></pre>
+
+				<p>Equivalent PHP configuration:</p>
+				
+<pre class="prettyprint"><![CDATA[
+array(
+    'appenders' => array(
+        'default' => array(
+            'class' => 'LoggerAppenderSocket',
+            'params' => array(
+                'remoteHost' => 'localhost',
+                'port' => 4242
+            ),
+        ),
+    ),
+    'rootLogger' => array(
+        'appenders' => array('default'),
+    ),
+);
+]]></pre>
+			</subsection>
+		</section>
+	</body>
+</document>

Added: logging/log4php/trunk/src/site/xdoc/docs/appenders/syslog.xml
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/site/xdoc/docs/appenders/syslog.xml?rev=1186629&view=auto
==============================================================================
--- logging/log4php/trunk/src/site/xdoc/docs/appenders/syslog.xml (added)
+++ logging/log4php/trunk/src/site/xdoc/docs/appenders/syslog.xml Thu Oct 20 06:53:49 2011
@@ -0,0 +1,342 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+	<properties>
+		<title>LoggerAppenderSyslog</title>
+	</properties>
+
+	<body>
+		<section name="LoggerAppenderSyslog">
+		
+			<p><code>LoggerAppenderSyslog</code> logs events to the syslog.</p>
+			
+			<p>This appender does not require a layout.</p>
+			
+			<subsection name="Options">
+				<p>The following options are available:</p>
+		
+				<table>
+					<thead>
+						<tr>
+							<th>Option</th>
+							<th>Type</th>
+							<th>Required</th>
+							<th>Default</th>
+							<th>Description</th>
+						</tr>
+					</thead>
+					<tbody>
+						<tr>
+							<td>ident</td>
+							<td>string</td>
+							<td>no</td>
+							<td>Apache log4php</td>
+							<td>A string which will identify your appender.</td>
+						</tr>
+						<tr>
+							<td>overridePriority</td>
+							<td>boolean</td>
+							<td>No</td>
+							<td>false</td>
+							<td>If set to true, all messages will be sent to the syslog using the priority specified 
+							in the <code>priority</code> parameter. Otherwise, the pririty will depend on the level 
+							of the event being logged. See below.</td>
+						</tr>
+						<tr>
+							<td>priority</td>
+							<td>string</td>
+							<td>Yes/No</td>
+							<td>-</td>
+							<td>The syslog priority to use when overriding priority. This setting is required if 
+							<code>overridePriority</code> is set to true. <a href="#Priorities">See below</a> for 
+							available priorities.</td>
+						</tr>
+						<tr>
+							<td>facility</td>
+							<td>string</td>
+							<td>No</td>
+							<td><code>USER</code></td>
+							<td>The syslog facility. Identifies the part of the system from which the event originated.
+							<a href="#Facilities">See below</a> for available facilities.</td>
+						</tr>
+						<tr>
+							<td>option</td>
+							<td>string</td>
+							<td>No</td>
+							<td><code>PID | CONS</code></td>
+							<td>Syslog options. <a href="#Options">See below</a> for available options.</td>
+						</tr>
+					</tbody>
+				</table>
+			</subsection>
+			
+			<subsection name="Priorities" id="Priorities">
+			
+				<p>The <em>priority</em> is the syslog equivalent of the log4php level. Here's a list of priorities 
+				available in syslog and the equivalent log4php levels.</p>
+				
+				<table>
+					<thead>
+						<tr>
+							<th>Priority</th>
+							<th>Description</th>
+							<th>Equivalent level</th>
+						</tr>
+					</thead>
+					<tbody>
+						<tr>
+							<td>EMERG</td>
+							<td>System is unusable.</td>
+							<td>-</td>
+						</tr>
+						<tr>
+							<td>ALERT</td>
+							<td>Action must be taken immediately.</td>
+							<td>FATAL</td>
+						</tr>
+						<tr>
+							<td>CRIT</td>
+							<td>Critical conditions.</td>
+							<td>-</td>
+						</tr>
+						<tr>
+							<td>ERR</td>
+							<td>Error conditions.</td>
+							<td>ERROR</td>
+						</tr>
+						<tr>
+							<td>WARNING</td>
+							<td>Warning conditions</td>
+							<td>WARN</td>
+						</tr>
+						<tr>
+							<td>NOTICE</td>
+							<td>Normal, but significant, condition</td>
+							<td>-</td>
+						</tr>
+						<tr>
+							<td>INFO</td>
+							<td>Informational message</td>
+							<td>INFO</td>
+						</tr>
+						<tr>
+							<td>DEBUG</td>
+							<td>Debug-level message</td>
+							<td>DEBUG, TRACE</td>
+						</tr>					
+					</tbody>
+				</table>
+				
+				<p>Messages with level <code>FATAL</code> will be logged using the syslog's <code>ALERT</code> priority;
+				<code>ERROR</code> level message will use <code>ERR</code> priority, etc.</p>
+				
+				<p>Note that there is no priority below <code>DEBUG</code>, therefore both <code>TRACE</code> and 
+				<code>DEBUG</code> level mesages will be logged using the <code>DEBUG</code> syslog priority.</p>
+			
+			</subsection>
+			
+			<subsection name="Facilities" id="Facilities">
+			
+				<p>The <em>facility</em> option is used to specify what type of program is logging the message. This 
+				allows you to specify (in your machine's syslog configuration) how messages coming from different
+				facilities will be handled.</p>
+				
+				<p>The following facilities are available:</p>
+				
+				<table>
+					<thead>
+						<tr>
+							<th>Name</th>
+							<th>Description</th>
+						</tr>
+					</thead>
+					<tbody>
+						<tr>
+							<td>KERN</td>
+							<td>Kernel messages</td>
+						</tr>
+						<tr>
+							<td>USER</td>
+							<td>Generic user-level messages</td>
+						</tr>
+						<tr>
+							<td>MAIL</td>
+							<td>Mail system</td>
+						</tr>
+						<tr>
+							<td>DAEMON</td>
+							<td>System daemons</td>
+						</tr>
+						<tr>
+							<td>AUTH</td>
+							<td>Security/authorization messages</td>
+						</tr>
+						<tr>
+							<td>SYSLOG</td>
+							<td>Messages generated internally by syslogd</td>
+						</tr>
+						<tr>
+							<td>LPR</td>
+							<td>Line printer subsystem</td>
+						</tr>
+						<tr>
+							<td>NEWS</td>
+							<td>Network news subsystem</td>
+						</tr>
+						<tr>
+							<td>UUCP</td>
+							<td>UUCP subsystem</td>
+						</tr>
+						<tr>
+							<td>CRON</td>
+							<td>Clock daemon</td>
+						</tr>
+						<tr>
+							<td>AUTHPRIV</td>
+							<td>Security/authorization messages (private)</td>
+						</tr>
+						<tr>
+							<td>LOCAL0</td>
+							<td>Reserved for local use</td>
+						</tr>
+						<tr>
+							<td>LOCAL1</td>
+							<td>Reserved for local use</td>
+						</tr>
+						<tr>
+							<td>LOCAL2</td>
+							<td>Reserved for local use</td>
+						</tr>
+						<tr>
+							<td>LOCAL3</td>
+							<td>Reserved for local use</td>
+						</tr>
+						<tr>
+							<td>LOCAL4</td>
+							<td>Reserved for local use</td>
+						</tr>
+						<tr>
+							<td>LOCAL5</td>
+							<td>Reserved for local use</td>
+						</tr>
+						<tr>
+							<td>LOCAL6</td>
+							<td>Reserved for local use</td>
+						</tr>
+						<tr>
+							<td>LOCAL7</td>
+							<td>Reserved for local use</td>
+						</tr>
+					</tbody>
+				</table>
+				
+				<p class="alert-message warning">Warning: <code>USER</code> is the only available facility under 
+				Windows operating systems.</p>
+			
+			</subsection>
+			
+			<subsection name="Options" id="Options">
+			
+				<p>The following additional syslog options may be defined via the <em>option</em> parameter:</p>
+				
+				<table>
+					<thead>
+						<tr>
+							<th>Name</th>
+							<th>Description</th>
+						</tr>
+					</thead>
+					<tbody>
+						<tr>
+							<td>CONS</td>
+							<td>If there is an error while sending data to the system logger, write directly to the 
+							system console</td>
+						</tr>
+						<tr>
+							<td>NDELAY</td>
+							<td>Open the connection to the logger immediately.</td>
+						</tr>
+						<tr>
+							<td>ODELAY</td>
+							<td>Delay opening the connection until the first message is logged (default).</td>
+						</tr>
+						<tr>
+							<td>PERROR</td>
+							<td>Print log messages also to standard error.</td>
+						</tr>
+						<tr>
+							<td>PID</td>
+							<td>Include the PID with each message.</td>
+						</tr>
+					</tbody>
+				</table>
+				
+				<p>Multiple options may be set by separating them with a pipe character. For example 
+				<code>CONS|PID|NODELAY</code>.</p>
+				
+				<p class="alert-message warning">Warning: When setting multiple options in an INI configuration file, 
+				be sure to put the options string in quotes. Otherwise they will not be parsed correctly.</p>
+
+			</subsection>
+				
+			<subsection name="Examples">
+				
+				<p>XML configuration:</p>
+					
+<pre class="prettyprint"><![CDATA[
+<configuration xmlns="http://logging.apache.org/log4php/">
+    <appender name="default" class="LoggerAppenderSyslog">
+        <layout class="LoggerLayoutTTCC" />
+        <param name="ident" value="log4php-test" />
+        <param name="facility" value="LOCAL0" />
+        <param name="options" value="NDELAY|PID" />
+    </appender>
+    <root>
+        <appender_ref ref="default" />
+    </root>
+</configuration>
+]]></pre>
+
+				<p>Equivalent PHP configuration:</p>
+				
+<pre class="prettyprint"><![CDATA[
+array(
+    'appenders' => array(
+        'default' => array(
+            'class' => 'LoggerAppenderSyslog',
+            'layout' => array(
+            	'class' => 'LoggerLayoutTTCC',
+            ),
+            'params' => array(
+                'ident' => 'log4php-test',
+                'facility' => 'LOCAL0',
+                'options' => 'NDELAY|PID'
+            ),
+        ),
+    ),
+    'rootLogger' => array(
+        'appenders' => array('default'),
+    ),
+);
+]]></pre>
+			</subsection>
+		</section>
+	</body>
+</document>

Added: logging/log4php/trunk/src/site/xdoc/docs/configuration.xml
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/site/xdoc/docs/configuration.xml?rev=1186629&view=auto
==============================================================================
--- logging/log4php/trunk/src/site/xdoc/docs/configuration.xml (added)
+++ logging/log4php/trunk/src/site/xdoc/docs/configuration.xml Thu Oct 20 06:53:49 2011
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+	<properties>
+		<title>Configuration</title>
+	</properties>
+
+	<body>
+		<section name="Configuration">
+
+			<p>Apache log4php can be configured either programatically or with a file containing the configuration 
+			parameters in one of the supported formats.</p>
+			
+			<p>The configuration should be provided by calling <code>Logger::configure()</code> method before any logging 
+			is done. Otherwise, the <a href="#Default_configuration">default configuration</a> will be used.</p>
+			
+			<subsection name="XML" id="XML">
+			
+				<p>XML is the most common configuration format, and it is the most prominently featured in the 
+				documentation and examples.</p>
+				
+				
+			
+			</subsection>
+			
+			<subsection name="PHP" id="PHP">
+			
+				<p>Configuration can also be stored in a PHP array. This is the format used internally by log4php. Other 
+				formats are converted to a PHP array before being used. Because of this, the PHP configuration format 
+				should be used when performance is important.</p>
+				
+				<p>It is possible to pass an configuration array directly to <code>Logger::configure()</code>.</p>
+
+<pre class="prettyprint">
+Logger::configure(array(
+    'rootLogger' => array(
+        'appenders' => array('default'),
+    ),
+    'appenders' => array(
+        'default' => array(
+            'class' => 'LoggerAppenderConsole',
+            'layout' => array(
+                'class' => 'LoggerLayoutSimple'
+            )
+        )
+    )
+));
+</pre>
+				
+				<p>Alternatively a file can be created which holds the PHP configuration array. The file must
+				have the <code>php</code> extension and it should <em>return</em> the configuration array. For example, 
+				a file named <code>config.php</code> with the following content:</p>
+				
+<pre class="prettyprint">
+return array(
+    'rootLogger' => array(
+        'appenders' => array('default'),
+    ),
+    'appenders' => array(
+        'default' => array(
+            'class' => 'LoggerAppenderConsole',
+            'layout' => array(
+                'class' => 'LoggerLayoutSimple'
+            )
+        )
+    )
+);
+</pre>
+
+				<p>This file can then be used to configure log4php:</p>
+				
+				<pre class="prettyprint">Logger::configure('config.php');</pre>
+				
+				<div class="alert-message block-message info">
+					<p><strong>Hint:</strong> to translate a XML or properties configuration file to PHP, run the following code:</p>
+					<pre>Logger::configure('config.php');</pre>
+				</div>
+			</subsection>
+
+
+			<subsection name="Properties (INI)" id="INI">
+
+				<p>The properties configuration format is a legacy method of configuring log4php. It was inherited from 
+				<a href="logging.apache.org/log4j/1.2/manual.html">Apache log4j</a> and uses the same format. The only 
+				difference is that lines begin with <code>log4php</code> instead of <code>log4j</code>.</p>
+				
+				<div class="alert-message block-message warning">
+					<p>This format has been deprecated and will not be updated 
+				to include newly introduced features in the future. It is recommended that you use either the <a href="#XML">XML</a> or <a href="PHP">PHP</a> 
+				configuration format.</p></div>
+				
+				<p>The properites configuration format does not support filters.</p>
+				
+				<p>The following is a high level overview of all options provided by this format:</p>
+				
+				
+<pre class="prettyprint">
+# Appender named "default"
+log4php.appender.default = LoggerAppenderEcho
+log4php.appender.default.layout = LoggerLayoutTTCC
+
+# Appender named "file"
+log4php.appender.file = LoggerAppenderDailyFile
+log4php.appender.file.layout = LoggerLayoutPattern
+log4php.appender.file.layout.conversionPattern = %d{ISO8601} [%p] %c: %m (at %F line %L)%n
+log4php.appender.file.datePattern = Ymd
+log4php.appender.file.file = target/examples/daily_%s.log
+log4php.appender.file.threshold = warn
+
+# Root logger, linked to "default" appender
+log4php.rootLogger = DEBUG, default
+
+# Logger named "foo", linked to "default" appender
+log4php.logger.foo = warn, default
+
+# Logger named "foo.bar", linked to "file" appender
+log4php.logger.foo.bar = debug, file
+log4php.additivity.foo.bar = true
+
+# Logger named "foo.bar.baz", linked to both "file" and "default" appenders
+log4php.logger.foo.bar.baz = trace, default, file
+log4php.additivity.foo.bar.baz = false
+
+# Renderers for Fruit and Beer classes
+log4php.renderer.Fruit = FruitRenderer
+log4php.renderer.Beer = BeerRenderer
+
+# Setting base threshold
+log4php.threshold = debug
+</pre>
+			</subsection>
+
+			<subsection name="Default configuration" id="Default_configuration">
+				<p>If no configuration is provided before the initial logging request is issued, log4php will configure
+				using the default configuration. This consists of a single <code>LoggerAppenderEcho</code> appender,
+				using <code>LoggerLayoutTTCC</code>, attached to the root logger and set to the DEBUG level.</p>
+				
+				<p>The default configuration in PHP format is:</p>
+				
+<pre class="prettyprint">
+array(
+    'rootLogger' => array(
+        'appenders' => array('default'),
+    ),
+    'appenders' => array(
+        'default' => array(
+            'class' => 'LoggerAppenderConsole',
+            'layout' => array(
+                'class' => 'LoggerLayoutSimple'
+            )
+        )
+    )
+)
+</pre>
+
+				<div class="alert-message block-message info">
+					<p><strong>Hint:</strong> You can fetch the default configuration as a PHP array by running:</p>
+					<pre class="prettyprint">LoggerConfigurator::getDefaultConfiguration();</pre>
+				</div>
+			</subsection>
+			
+			<subsection name="Programmatic configuration">
+				
+				<p>It is possible to configure log4php fully programmatically.</p>
+				
+			</subsection>
+
+
+		</section>
+	</body>
+</document>



Mime
View raw message