Public Member Functions | |
XMLSocketAppender (unsigned long address, int port) | |
XMLSocketAppender (const String &host, int port) | |
void | activateOptions () |
virtual void | setOption (const String &option, const String &value) |
void | close () |
void | cleanUp () |
virtual void | append (const spi::LoggingEventPtr &event) |
bool | requiresLayout () const |
void | setRemoteHost (const String &host) |
const String & | getRemoteHost () const |
void | setPort (int port) |
int | getPort () const |
void | setLocationInfo (bool locationInfo) |
bool | getLocationInfo () const |
void | setReconnectionDelay (int reconnectionDelay) |
int | getReconnectionDelay () const |
Static Public Attributes | |
static int | DEFAULT_PORT = 4560 |
static int | DEFAULT_RECONNECTION_DELAY = 30000 |
Protected Attributes | |
String | remoteHost |
helpers::InetAddress | address |
Static Protected Attributes | |
static const int | MAX_EVENT_LEN = 1024 |
The XMLSocketAppender has the following properties:
XMLSocketAppender
is no longer attached to any logger, it will not be destroyed in the presence of a connector thread. A connector thread exists only if the connection to the server is down. To avoid this destruction problem, you should close the the XMLSocketAppender
explicitly. See also next item. XMLSocketAppender
instances should be aware of this destruction problem. Most other applications can safely ignore it.
XMLSocketAppender
exits before the XMLSocketAppender
is closed either explicitly or subsequent to destruction, then there might be untransmitted data in the pipe which might be lost. XMLSocketAppender
either explicitly or by calling the LogManager::shutdown method before exiting the application.
|
Connects to remote server at |
|
Connects to remote server at |
|
Connect to the specified RemoteHost and Port. Reimplemented from AppenderSkeleton. |
|
Subclasses of Implements AppenderSkeleton. |
|
Drop the connection to the remote host and release the underlying connector thread if it has been created |
|
Close this appender. This will mark the appender as closed and call then cleanUp method. Implements Appender. |
|
Returns value of the LocationInfo option. |
|
Returns value of the Port option. |
|
Returns value of the ReconnectionDelay option. |
|
Returns value of the RemoteHost option. |
|
The XMLSocketAppender use an internal XMLLayout. Hence, this method returns Implements Appender. |
|
The LocationInfo option takes a boolean value. If true, the information sent to the remote host will include location information. By default no location information is sent to the server. |
|
Set options Reimplemented from AppenderSkeleton. |
|
The Port option takes a positive integer representing the port where the server is waiting for connections. |
|
The ReconnectionDelay option takes a positive integer representing the number of milliseconds to wait between each failed connection attempt to the server. The default value of this option is 30000 which corresponds to 30 seconds. Setting this option to zero turns off reconnection capability. |
|
The RemoteHost option takes a string value which should be the host name of the server where an XMLSocketNode is running. |
|
IP address |
|
The default port number of remote logging server (4560). |
|
The default reconnection delay (30000 milliseconds or 30 seconds). |
|
An event XML stream cannot exceed 1024 bytes. |
|
host name |