org.apache.avalon.logging.logkit.factory.socket
Class SocketTargetFactory

java.lang.Object
  extended byorg.apache.avalon.logging.logkit.factory.socket.SocketTargetFactory
All Implemented Interfaces:
LogTargetFactory

public class SocketTargetFactory
extends Object
implements LogTargetFactory

This plugin 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.

Version:
$Revision: 1.5 $ $Date: 2004/03/17 10:30:09 $
Author:
Avalon Development Team

Constructor Summary
SocketTargetFactory()
           
 
Method Summary
 LogTarget createTarget(Configuration conf)
          Creates a log target based on Configuration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocketTargetFactory

public SocketTargetFactory()
Method Detail

createTarget

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

Specified by:
createTarget in interface LogTargetFactory
Parameters:
conf - Configuration requied for creating the log target
Throws:
ConfigurationException - if something goes wrong while reading from configuration
LogTargetException


Copyright © The Apache Software Foundation. All Rights Reserved.