log4cplus
2.0.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, bool ipv6=false) | |
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 |
bool | ipv6 = false |
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. Default is 5000.
IPv6
Boolean value specifying whether to use IPv6 (true) or IPv4 (false). Default value is false.
Definition at line 61 of file log4judpappender.h.
log4cplus::Log4jUdpAppender::Log4jUdpAppender | ( | const log4cplus::tstring & | host, |
int | port, | ||
bool | ipv6 = false |
||
) |
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 80 of file log4judpappender.h.
bool log4cplus::Log4jUdpAppender::ipv6 = false [protected] |
Definition at line 82 of file log4judpappender.h.
int log4cplus::Log4jUdpAppender::port [protected] |
Definition at line 81 of file log4judpappender.h.
Definition at line 79 of file log4judpappender.h.