The TelnetAppender writes log messages to clients that connect to the TCP port.
More...
#include <telnetappender.h>
Inheritance diagram for log4cxx::net::TelnetAppender:
If no layout is provided, sends only the log message to attached client(s).
The current encoding value.
Set the encoding to value.
Activate the options that were previously set with calls to option setters.
Set option to value.
The TCP Port number on which to accept connections.
Use newValue as the TCP port number on which to accept connections.
The Hostname on which to accept connections.
Use newValue as the Hostname on which to accept connections.
The number of allowed concurrent connections.
Set the number of allowed concurrent connections to newValue.
Use newValue for the SO_REUSEADDR option of the socket accepting connections.
Shutdown this appender.
Finalize this appender by calling the derived class' close method.
Activate the options that were previously set with calls to option setters.
Set option to value.
Add a filter to end of the filter list.
Clear the filters chain.
Returns the head Filter.
Return the first filter in the filter chain for this
Appender.
Returns the layout of this appender.
Returns this appenders threshold level.
Check whether the message level is below the appender's threshold.
This method performs threshold checks and invokes filters before delegating actual logging to the subclasses specific
AppenderSkeleton::append method.
Set the layout for this appender.
Set the threshold level.
Add a filter to the end of the filter list.
Returns the head Filter.
Clear the list of filters by removing all the filters in it.
Release any resources allocated within the appender such as file handles, network connections, etc.
Get the name of this appender.
Set the
Layout for this appender.
Returns this appenders layout.
Set the name of this appender.
Configurators call this method to determine if the appender requires a layout.
Activate the options that were previously set with calls to option setters.
Set option to value.
virtual const void *
cast (const
Class &clazz) const =0
Protected Member Functions
Send event to each connected client.
Subclasses of
AppenderSkeleton should implement this method to perform actual logging.
Detailed Description
The TelnetAppender writes log messages to clients that connect to the TCP port.
This allows logging output to be monitored using TCP/IP. To receive log data, use telnet to connect to the configured port number.
TelnetAppender is most useful as a secondary appender, especially when monitoring a servlet remotely.
If no layout is provided, the log message only is sent to attached client(s).
The ReuseAddress option is disabled by default. Enable it to be able to connect to this appender immediately after the logging process restarts.
See TelnetAppender::setOption() for the available options.
Constructor & Destructor Documentation
◆ TelnetAppender()
log4cxx::net::TelnetAppender::TelnetAppender
(
)
◆ ~TelnetAppender()
log4cxx::net::TelnetAppender::~TelnetAppender
(
)
Member Function Documentation
◆ activateOptions()
void log4cxx::net::TelnetAppender::activateOptions
(
helpers::Pool &
p )
overridevirtual |
Activate the options that were previously set with calls to option setters.
Create the socket handler and wait for connections.
Reimplemented from log4cxx::AppenderSkeleton.
◆ append()
)
overrideprotectedvirtual |
◆ close()
void log4cxx::net::TelnetAppender::close
(
)
overridevirtual |
◆ getEncoding()
LogString log4cxx::net::TelnetAppender::getEncoding
(
)
const
The current encoding value.
- See also
- setOption
◆ getHostname()
LogString log4cxx::net::TelnetAppender::getHostname
(
)
const
The Hostname on which to accept connections.
◆ getMaxConnections()
int log4cxx::net::TelnetAppender::getMaxConnections
(
)
const
The number of allowed concurrent connections.
- See also
- setOption
◆ getPort()
int log4cxx::net::TelnetAppender::getPort
(
)
const
The TCP Port number on which to accept connections.
◆ requiresLayout()
bool log4cxx::net::TelnetAppender::requiresLayout
(
)
const
overridevirtual |
If no layout is provided, sends only the log message to attached client(s).
Implements log4cxx::Appender.
◆ setEncoding()
void log4cxx::net::TelnetAppender::setEncoding
(
const
LogString &
value )
◆ setHostname()
void log4cxx::net::TelnetAppender::setHostname
(
const
LogString &
newValue )
Use newValue as the Hostname on which to accept connections.
By default connections are accepted on any network interface device.
◆ setMaxConnections()
void log4cxx::net::TelnetAppender::setMaxConnections
(
int
newValue )
Set the number of allowed concurrent connections to newValue.
- See also
- setOption
◆ setOption()
void log4cxx::net::TelnetAppender::setOption
(
const
LogString &
option,
)
overridevirtual |
Set option to value.
| Supported options | Supported values | Default value |
| Port | {int} | 23 |
Hostname | name or numeric address | MaxConnections | {int} | 20 Encoding | C,UTF-8,UTF-16,UTF-16BE,UTF-16LE,646,US-ASCII,ISO646-US,ANSI_X3.4-1968,ISO-8859-1,ISO-LATIN-1 | UTF-8 ReuseAddress | True,False | False
- See also
- AppenderSkeleton::setOption()
Reimplemented from log4cxx::AppenderSkeleton.
◆ setPort()
void log4cxx::net::TelnetAppender::setPort
(
int
newValue )
Use newValue as the TCP port number on which to accept connections.
◆ setReuseAddress()
void log4cxx::net::TelnetAppender::setReuseAddress
(
bool
newValue )
Use newValue for the SO_REUSEADDR option of the socket accepting connections.
When set to true, a telnet client can connect when the socket is in a TIME_WAIT state, so log message delivery will resume quickly when a terminated process restarts.
- See also
- setOption
The documentation for this class was generated from the following file: