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:
- Configurable, Contextualizable, LogEnabled, LogTargetFactory
- public class DatagramTargetFactory
- extends AbstractTargetFactory
This factory creates LogTargets with a wrapped DatagramOutputTarget around it.
Configuration syntax:
<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.
- Author:
- Avalon Development Team
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DatagramTargetFactory
public DatagramTargetFactory()
createTarget
public LogTarget createTarget(Configuration conf)
throws ConfigurationException
- Create a LogTarget based on a Configuration
- Throws:
ConfigurationException
getFormatter
protected Formatter getFormatter(Configuration conf)
- Returns the Formatter
- Parameters:
conf
- Configuration for the formatter
Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.