Apache log4cxx  Version 0.10.0
TelnetAppender Class Reference
Inheritance diagram for TelnetAppender:
AppenderSkeleton Appender ObjectImpl OptionHandler Object Object

Public Member Functions

 TelnetAppender ()
 
 ~TelnetAppender ()
 
virtual bool requiresLayout () const
 This appender requires a layout to format the text to the attached client(s). More...
 
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. More...
 
virtual void setOption (const LogString &option, const LogString &value)
 Set options. More...
 
int getPort () const
 Returns value of the Port option. More...
 
void setPort (int port1)
 The Port option takes a positive integer representing the port where the server is waiting for connections. More...
 
void close ()
 shuts down the appender. More...
 
- Public Member Functions inherited from AppenderSkeleton
 AppenderSkeleton ()
 
 AppenderSkeleton (const LayoutPtr &layout)
 
void addRef () const
 
void releaseRef () const
 
void finalize ()
 Finalize this appender by calling the derived class' close method. More...
 
void addFilter (const spi::FilterPtr &newFilter)
 Add a filter to end of the filter list. More...
 
void clearFilters ()
 Clear the filters chain. More...
 
const spi::ErrorHandlerPtrgetErrorHandler () const
 Return the currently set spi::ErrorHandler for this Appender. More...
 
spi::FilterPtr getFilter () const
 Returns the head Filter. More...
 
const spi::FilterPtrgetFirstFilter () const
 Return the first filter in the filter chain for this Appender. More...
 
LayoutPtr getLayout () const
 Returns the layout of this appender. More...
 
LogString getName () const
 Returns the name of this Appender. More...
 
const LevelPtrgetThreshold ()
 Returns this appenders threshold level. More...
 
bool isAsSevereAsThreshold (const LevelPtr &level) const
 Check whether the message level is below the appender's threshold. More...
 
void doAppend (const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &pool)
 This method performs threshold checks and invokes filters before delegating actual logging to the subclasses specific AppenderSkeleton::append method. More...
 
void setErrorHandler (const spi::ErrorHandlerPtr &eh)
 Set the ErrorHandler for this Appender. More...
 
void setLayout (const LayoutPtr &layout1)
 Set the layout for this appender. More...
 
void setName (const LogString &name1)
 Set the name of this Appender. More...
 
void setThreshold (const LevelPtr &threshold)
 Set the threshold level. More...
 
- Public Member Functions inherited from Appender
virtual ~Appender ()
 
- Public Member Functions inherited from OptionHandler
virtual ~OptionHandler ()
 
- Public Member Functions inherited from Object
virtual const helpers::ClassgetClass () const
 
virtual ~Object ()
 
virtual bool instanceof (const Class &clazz) const =0
 
virtual const void * cast (const Class &clazz) const =0
 
- Public Member Functions inherited from ObjectImpl
 ObjectImpl ()
 
virtual ~ObjectImpl ()
 
void addRef () const
 
void releaseRef () const
 

Protected Member Functions

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

Friends

class SocketHandler
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static const helpers::ClassgetStaticClass ()
 
static const log4cxx::helpers::ClassRegistrationregisterClass ()
 
- Protected Attributes inherited from AppenderSkeleton
LayoutPtr layout
 The layout variable does not need to be set if the appender implementation has its own layout. More...
 
LogString name
 Appenders are named. More...
 
LevelPtr threshold
 There is no level threshold filtering by default. More...
 
spi::ErrorHandlerPtr errorHandler
 It is assumed and enforced that errorHandler is never null. More...
 
spi::FilterPtr headFilter
 The first filter in the filter chain. More...
 
spi::FilterPtr tailFilter
 The last filter in the filter chain. More...
 
bool closed
 Is this appender closed? More...
 
log4cxx::helpers::Pool pool
 
log4cxx::helpers::Mutex mutex
 
- Protected Attributes inherited from ObjectImpl
unsigned int volatile ref
 

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

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 
)
protectedvirtual

Handles a log event.

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

Implements AppenderSkeleton.

void close ( )
virtual

shuts down the appender.

Implements Appender.

LogString getEncoding ( ) const
int getPort ( ) const
inline

Returns value of the Port option.

virtual bool requiresLayout ( ) const
inlinevirtual

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: