LoggerAppenderSocketLoggerAppenderSocket appends to a network socket. LayoutThis appender requires a layout. If no layout is specified in configuration, LoggerLayoutSerialized will be used by default. Prior to version 2.2, a layout was not required. ParametersThe following parameters are available:
Changelog
ExamplesIn this example, log events are sent to a socket server at localhost:4242, using the default (serialized) layout.
<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> array( 'appenders' => array( 'default' => array( 'class' => 'LoggerAppenderSocket', 'params' => array( 'remoteHost' => 'localhost', 'port' => 4242 ), ), ), 'rootLogger' => array( 'appenders' => array('default'), ), ); |