A Rhino management sub task for creating a log socket appender.

Ant Parameters
Attribute Type Description Required

appendername

String

Name of the appender to create. This name must be unique.

Yes.

remotehost

String

Name or IP address of the remote host to connect to.

Yes.

port

int

Port on the remote host to connect to.

Yes.

protocol

String

"TCP" (default), "SSL" or "UDP".

No. If not specified, the default is TCP

immediatefail

boolean

When set to true, log events will not wait to try to reconnect and will fail immediately if the socket is not available.

Yes.

immediateflush

boolean

When set to true, each write will be followed by a flush. This will guarantee the data is written to disk but could impact performance.

No. If not specified, defaults to true.

bufferedio

boolean

When true, events are written to a buffer and the data will be written to the socket when the buffer is full or, if immediateFlush is set, when the record is written.

No. If not specified, defaults to true.

buffersize

int

When bufferedIO is true, this is the buffer size, the default is 8192 bytes.

No.

reconnectiondelaymillis

int

If set to a value greater than 0, after an error the SocketManager will attempt to reconnect to the server after waiting the specified number of milliseconds. If the reconnect fails then an exception will be thrown (which can be caught by the application if ignoreExceptions is set to false).

No. If not specified, the default is 0

connecttimeoutmillis

int

The connect timeout in milliseconds. The default is 0 (infinite timeout, like Socket.connect() methods).

No.

keystorelocation

String

The location of the KeyStore which is used to create an SslConfiguration

No.

keystorepassword

String

The password to access the KeyStore.

No.

truststorelocation

String

The location of the TrustStore which is used to create an SslConfiguration

No.

truststorepassword

String

The password of the TrustStore

No.

ignoreexceptions

boolean

The default is true, causing exceptions encountered while appending events to be internally logged and then ignored. When set to false exceptions will be propagated to the caller, instead.

No.

failonerror

boolean

Flag to control failure behaviour. If 'true', the sub task will throw a BuildException when an error is encountered. If 'false', the sub task will throw a NonFatalBuildException instead of a BuildException under specific circumstances. See below for conditions (if any) which will cause a NonFatalBuildException.

No. Default value is taken from the Rhino management parent task.

Nested elements

Element

Description

Required

filter

A filter to select events that will be reported by this appender.

No.

layout

The layout to use to format log events. If no layout is supplied the default pattern layout of "%m%n" will be used.

No.

NonFatalBuildException throw conditions
  • This task will throw a NonFatalBuildException if the appender cannot be created, eg. an appender with the same name already exists.

Previous page Next page
Rhino Version 2.6.1