TelnetAppender Class Reference

Inherits log4cxx::AppenderSkeleton.

List of all members.

Classes

class  ClazzTelnetAppender

Public Member Functions

virtual const helpers::ClassgetClass () const
const void * cast (const helpers::Class &clazz) const
bool instanceof (const helpers::Class &clazz) const
 TelnetAppender ()
 ~TelnetAppender ()
virtual bool requiresLayout () const
 This appender requires a layout to format the text to the attached client(s).
LogString getEncoding () const
void setEncoding (const LogString &value)
void activateOptions (log4cxx::helpers::Pool &p)
 all of the options have been set, create the socket handler and wait for connections.
virtual void setOption (const LogString &option, const LogString &value)
 Set options.
int getPort () const
 Returns value of the Port option.
void setPort (int port1)
 The Port option takes a positive integer representing the port where the server is waiting for connections.
void close ()
 shuts down the appender.

Static Public Member Functions

static const helpers::ClassgetStaticClass ()
static const
log4cxx::helpers::ClassRegistration
registerClass ()

Protected Member Functions

virtual void append (const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &p)
 Handles a log event.

Friends

class SocketHandler

Detailed Description

The TelnetAppender is a log4cxx appender that specializes in writing to a read-only socket. The output is provided in a telnet-friendly way so that a log can be monitored over TCP/IP. Clients using telnet connect to the socket and receive log data. This is handy for remote monitoring, especially when monitoring a servlet.

Here is a list of the available configuration options:

Name Requirement Description

Sample Value

Port optional This parameter determines the port to use for announcing log events. The default port is 23 (telnet). 5875

Constructor & Destructor Documentation

TelnetAppender (  ) 
~TelnetAppender (  ) 

Member Function Documentation

void activateOptions ( log4cxx::helpers::Pool p  )  [virtual]

all of the options have been set, create the socket handler and wait for connections.

Reimplemented from AppenderSkeleton.

virtual void append ( const spi::LoggingEventPtr event,
log4cxx::helpers::Pool p 
) [protected, virtual]

Handles a log event.

For this appender, that means writing the message to each connected client.

Implements AppenderSkeleton.

const void* cast ( const helpers::Class clazz  )  const [inline, virtual]

Implements Object.

void close (  )  [virtual]

shuts down the appender.

Implements Appender.

virtual const helpers::Class& getClass (  )  const [virtual]

Reimplemented from Object.

LogString getEncoding (  )  const
int getPort (  )  const [inline]

Returns value of the Port option.

static const helpers::Class& getStaticClass (  )  [static]

Reimplemented from Object.

bool instanceof ( const helpers::Class clazz  )  const [inline, virtual]

Implements Object.

static const log4cxx::helpers::ClassRegistration& registerClass (  )  [static]

Reimplemented from Object.

virtual bool requiresLayout (  )  const [inline, virtual]

This appender requires a layout to format the text to the attached client(s).

Implements Appender.

void setEncoding ( const LogString value  ) 
virtual void setOption ( const LogString option,
const LogString value 
) [virtual]

Set options.

Reimplemented from AppenderSkeleton.

void setPort ( int  port1  )  [inline]

The Port option takes a positive integer representing the port where the server is waiting for connections.


Friends And Related Function Documentation

friend class SocketHandler [friend]

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