log4cplus_Log4jUdpAppender(3)
| log4cplus::Log4jUdpAppender(3) | log4cplus | log4cplus::Log4jUdpAppender(3) |
NAME
log4cplus::Log4jUdpAppender - Sends log events as Log4j XML to a remote a log server.
SYNOPSIS
#include <log4judpappender.h>
Inherits log4cplus::Appender.
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
Additional Inherited Members
Detailed Description
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.
- Remote logging uses the UDP protocol.
Properties
- 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.
Constructor & Destructor Documentation
log4cplus::Log4jUdpAppender::Log4jUdpAppender (const log4cplus::tstring & host, int port, bool ipv6 = false)
log4cplus::Log4jUdpAppender::Log4jUdpAppender (const log4cplus::helpers::Properties & properties)
log4cplus::Log4jUdpAppender::~Log4jUdpAppender ()
Member Function Documentation
virtual void log4cplus::Log4jUdpAppender::append (const spi::InternalLoggingEvent & event) [protected], [virtual]
Subclasses of Appender should implement this method to perform actual logging.
See also
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]
Member Data Documentation
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.
log4cplus::helpers::Socket log4cplus::Log4jUdpAppender::socket [protected]
Definition at line 79 of file log4judpappender.h.
Author
Generated automatically by Doxygen for log4cplus from the source code.
| Fri Jun 18 2021 | Version 2.0.6 |
