log4cplus
1.1.0
|
Sends log events as Log4j XML to a remote a log server. More...
#include <log4judpappender.h>
Public Member Functions | |
Log4jUdpAppender (const log4cplus::tstring &host, int port) | |
Log4jUdpAppender (const log4cplus::helpers::Properties &properties) | |
~Log4jUdpAppender () | |
virtual void | close () |
Release any resources allocated within the appender such as file handles, network connections, etc. | |
Protected Member Functions | |
void | openSocket () |
virtual void | append (const spi::InternalLoggingEvent &event) |
Subclasses of Appender should implement this method to perform actual logging. | |
Protected Attributes | |
log4cplus::helpers::Socket | socket |
log4cplus::tstring | host |
int | port |
Sends log events as Log4j XML to a remote a log server.
The Log4jUdpAppender has the following properties:
Remote logging is non-intrusive as far as the log event is concerned. In other words, the event will be logged with the same time stamp, NDC, location info as if it were logged locally by the client.
host
Remote host name to connect and send events to.
port
Port on remote host to send events to.
Definition at line 57 of file log4judpappender.h.
log4cplus::Log4jUdpAppender::Log4jUdpAppender | ( | const log4cplus::tstring & | host, |
int | port | ||
) |
log4cplus::Log4jUdpAppender::Log4jUdpAppender | ( | const log4cplus::helpers::Properties & | properties | ) |
virtual void log4cplus::Log4jUdpAppender::append | ( | const spi::InternalLoggingEvent & | event | ) | [protected, virtual] |
Subclasses of Appender
should implement this method to perform actual logging.
Implements log4cplus::Appender.
virtual void log4cplus::Log4jUdpAppender::close | ( | ) | [virtual] |
Release any resources allocated within the appender such as file handles, network connections, etc.
It is a programming error to append to a closed appender.
Implements log4cplus::Appender.
void log4cplus::Log4jUdpAppender::openSocket | ( | ) | [protected] |
log4cplus::tstring log4cplus::Log4jUdpAppender::host [protected] |
Definition at line 75 of file log4judpappender.h.
int log4cplus::Log4jUdpAppender::port [protected] |
Definition at line 76 of file log4judpappender.h.
Definition at line 74 of file log4judpappender.h.