LoggerAppenderConsole
LoggerAppenderConsole writes logging events to the php://stdout or
the php://stderr stream, the former being the default target.
Layout
This appender requires a layout. If no layout is specified in configuration,
LoggerLayoutSimple will be used by default.
Parameters
The following parameters are available:
Parameter |
Type |
Required |
Default |
Description |
target |
string |
No |
stdout |
The stream to write to; either "stdout" or "stderr". |
Examples
This example shows how to configure LoggerAppenderConsole.
- <configuration xmlns="http://logging.apache.org/log4php/">
- <appender name="default" class="LoggerAppenderConsole">
- <layout class="LoggerLayoutSimple" />
- </appender>
- <root>
- <appender_ref ref="default" />
- </root>
- </configuration>
- array(
- 'appenders' => array(
- 'default' => array(
- 'class' => 'LoggerAppenderConsole',
- 'layout' => array(
- 'class' => 'LoggerLayoutSimple',
- ),
- ),
- ),
- 'rootLogger' => array(
- 'appenders' => array('default'),
- ),
- );
|