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:
- LogTargetFactory, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled
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
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.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 |
DatagramTargetFactory
public DatagramTargetFactory()
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
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException
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 © 1997-2008 Apache Software Foundation. All Rights Reserved.