log4cplus  2.0.0
Public Member Functions | Protected Member Functions | Protected Attributes
log4cplus::Log4jUdpAppender Class Reference

Sends log events as Log4j XML to a remote a log server. More...

#include <log4judpappender.h>

Inheritance diagram for log4cplus::Log4jUdpAppender:
[legend]
Collaboration diagram for log4cplus::Log4jUdpAppender:
[legend]

List of all members.

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

Detailed Description

Sends log events as Log4j XML to a remote a log server.

The Log4jUdpAppender has the following properties:

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 
)

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:
doAppend method.

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.


Member Data Documentation

Definition at line 80 of file log4judpappender.h.

bool log4cplus::Log4jUdpAppender::ipv6 = false [protected]

Definition at line 82 of file log4judpappender.h.

Definition at line 81 of file log4judpappender.h.

Definition at line 79 of file log4judpappender.h.


The documentation for this class was generated from the following file: