org.apache.avalon.excalibur.logger.factory
Class SocketTargetFactory
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.avalon.excalibur.logger.factory.AbstractTargetFactory
org.apache.avalon.excalibur.logger.factory.SocketTargetFactory
- All Implemented Interfaces:
- Configurable, Contextualizable, LogEnabled, LogTargetFactory
- public class SocketTargetFactory
- extends AbstractTargetFactory
This factory creates LogTargets with a wrapped SocketOutputTarget around it.
Configuration syntax:
<socket-target id="target-id">
<address hostname="hostname" port="4455" />
</socket-target>
This factory creates a SocketOutputTarget object which will
TCP/IP socket to communicate with the server. The name of the target is specified by the
hostname attribute of the <address> element and the port by the port attribute.
In the config file above the formatting for the log messages is not embedded as it should
be specified on the server side
- Author:
- Avalon Development Team
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SocketTargetFactory
public SocketTargetFactory()
createTarget
public LogTarget createTarget(Configuration conf)
throws ConfigurationException
- Creates a log target based on Configuration
- Parameters:
conf
- Configuration requied for creating the log target
- Throws:
ConfigurationException
- if something goes wrong while reading from
configuration
Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.