Class SocketTargetFactory

  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.avalon.excalibur.logger.factory.AbstractTargetFactory
          extended byorg.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" />

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

Avalon Development Team

Field Summary
Fields inherited from class org.apache.avalon.excalibur.logger.factory.AbstractTargetFactory
m_configuration, m_context
Constructor Summary
Method Summary
 LogTarget createTarget(Configuration conf)
          Creates a log target based on Configuration
Methods inherited from class org.apache.avalon.excalibur.logger.factory.AbstractTargetFactory
configure, contextualize
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public SocketTargetFactory()
Method Detail


public LogTarget createTarget(Configuration conf)
                       throws ConfigurationException
Creates a log target based on Configuration

conf - Configuration requied for creating the log target
ConfigurationException - if something goes wrong while reading from configuration

Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.