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:
- Rajendra Ghorpade
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
- Specified by:
createTarget
in interface LogTargetFactory
- Specified by:
createTarget
in class AbstractTargetFactory
- Parameters:
conf
- Configuration requied for creating the log target
- Throws:
ConfigurationException
- if something goes wrong while reading from
configuration
Copyright © 2000-2003 Apache Jakarta Project. All Rights Reserved.