org.apache.avalon.excalibur.logger.factory
Class DatagramTargetFactory

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLogEnabled
        |
        +--org.apache.avalon.excalibur.logger.factory.AbstractTargetFactory
              |
              +--org.apache.avalon.excalibur.logger.factory.DatagramTargetFactory
All Implemented Interfaces:
org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled, LogTargetFactory

public class DatagramTargetFactory
extends AbstractTargetFactory

DatagramTargetFactory This factory creates LogTargets with a wrapped DatagramOutputTarget around it:


 <datagram-target id="target-id">
   <address hostname="hostname" port="4455" />
     <format type="extended">
                %7.7{priority} %23.23{time:yyyy-MM-dd HH:mm:ss:SSS}   [%25.25{category}] : %{message}\n%{throwable}
     </format>
 </datagram-target>
 

This factory creates a DatagramOutputTarget object which will sends datagrams to the specified address. The name of the target is specified by the hostname attribute of the <address> element and the port by the port attribute.The <address> element wraps the format to output the log.

Version:
 
Author:
Rajendra Ghorpade

Fields inherited from class org.apache.avalon.excalibur.logger.factory.AbstractTargetFactory
m_configuration, m_context
 
Constructor Summary
DatagramTargetFactory()
           
 
Method Summary
 org.apache.log.LogTarget createTarget(org.apache.avalon.framework.configuration.Configuration conf)
          Create a LogTarget based on a Configuration
protected  org.apache.log.format.Formatter getFormatter(org.apache.avalon.framework.configuration.Configuration conf)
          Returns the Formatter
 
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

DatagramTargetFactory

public DatagramTargetFactory()
Method Detail

createTarget

public org.apache.log.LogTarget createTarget(org.apache.avalon.framework.configuration.Configuration conf)
                                      throws org.apache.avalon.framework.configuration.ConfigurationException
Create a LogTarget based on a Configuration
Overrides:
createTarget in class AbstractTargetFactory

getFormatter

protected org.apache.log.format.Formatter getFormatter(org.apache.avalon.framework.configuration.Configuration conf)
Returns the Formatter
Parameters:
conf - Configuration for the formatter


Copyright © 2001 Apache Jakarta Project. All Rights Reserved.