public class DatagramTargetFactory extends AbstractTargetFactory
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.
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
FORMAT
Default format
|
m_configuration, m_context| Constructor and Description |
|---|
DatagramTargetFactory() |
| Modifier and Type | Method and Description |
|---|---|
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
|
configure, contextualizeprivate static final java.lang.String FORMAT
public org.apache.log.LogTarget createTarget(org.apache.avalon.framework.configuration.Configuration conf)
throws org.apache.avalon.framework.configuration.ConfigurationException
org.apache.avalon.framework.configuration.ConfigurationExceptionprotected org.apache.log.format.Formatter getFormatter(org.apache.avalon.framework.configuration.Configuration conf)
conf - Configuration for the formatter