Minor indentation fix.
[logging-log4php.git] / src / site / xdoc / docs / appenders / echo.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Licensed to the Apache Software Foundation (ASF) under one or more
4 contributor license agreements. See the NOTICE file distributed with
5 this work for additional information regarding copyright ownership.
6 The ASF licenses this file to You under the Apache License, Version 2.0
7 (the "License"); you may not use this file except in compliance with
8 the License. You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 -->
18 <document xmlns="http://maven.apache.org/XDOC/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19 xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
20
21 <properties>
22 <title>LoggerAppenderEcho</title>
23 </properties>
24
25 <body>
26 <section name="LoggerAppenderEcho">
27
28 <p><code>LoggerAppenderEcho</code> writes logging events using PHP's
29 <code><a class="external" href="http://php.net/manual/en/function.echo.php">echo()</a></code> function.
30 Echo outputs may be buffered.</p>
31
32 <subsection name="Layout">
33 <p>This appender requires a layout. If no layout is specified in configuration,
34 <code><a href="../layouts/simple.html">LoggerLayoutSimple</a></code> will be used by default.</p>
35 </subsection>
36
37 <subsection name="Parameters">
38 <p>The following parameters are available:</p>
39
40 <table>
41 <thead>
42 <tr>
43 <th>Parameter</th>
44 <th>Type</th>
45 <th>Required</th>
46 <th>Default</th>
47 <th>Description</th>
48 </tr>
49 </thead>
50 <tbody>
51 <tr>
52 <td>htmlLineBreaks</td>
53 <td>boolean</td>
54 <td>No</td>
55 <td>false</td>
56 <td>If set to true, a <![CDATA[<br />]]> element will be inserted before each line break in
57 the logged message.</td>
58 </tr>
59 </tbody>
60 </table>
61 </subsection>
62
63 <subsection name="Examples">
64 <p>This example shows how to configure <code>LoggerAppenderEcho</code> using the
65 <a href="../layouts/ttcc.html">TTCC layout</a> with <code>htmlLineBreaks</code> turned on.</p>
66
67 <div class="auto-tabs">
68 <ul>
69 <li>XML</li>
70 <li>PHP</li>
71 </ul>
72
73 <div class="tab-content" >
74 <div class="tab-pane">
75 <pre class="prettyprint"><![CDATA[
76 <configuration xmlns="http://logging.apache.org/log4php/">
77 <appender name="default" class="LoggerAppenderEcho">
78 <layout class="LoggerLayoutSimple" />
79 <param name="htmlLineBreaks" value="true" />
80 </appender>
81 <root>
82 <appender_ref ref="default" />
83 </root>
84 </configuration>
85 ]]></pre>
86 </div>
87 <div class="tab-pane">
88 <pre class="prettyprint"><![CDATA[
89 array(
90 'appenders' => array(
91 'default' => array(
92 'class' => 'LoggerAppenderEcho',
93 'layout' => array(
94 'class' => 'LoggerLayoutSimple',
95 ),
96 'params' => array(
97 'htmlLineBreaks' => 'true',
98 ),
99 ),
100 ),
101 'rootLogger' => array(
102 'appenders' => array('default'),
103 ),
104 );
105 ]]></pre>
106 </div>
107 </div>
108 </div>
109 </subsection>
110 </section>
111 </body>
112 </document>