 |
log4cplus
2.0.5
|
Go to the documentation of this file.
24 #ifndef LOG4CPLUS_SOCKET_APPENDER_HEADER_
25 #define LOG4CPLUS_SOCKET_APPENDER_HEADER_
29 #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE)
107 #if ! defined (LOG4CPLUS_SINGLE_THREADED)
136 #if ! defined (LOG4CPLUS_SINGLE_THREADED)
164 #endif // LOG4CPLUS_SOCKET_APPENDER_HEADER_
This class implements client sockets (also called just "sockets").
virtual void append(const spi::InternalLoggingEvent &event)
Subclasses of Appender should implement this method to perform actual logging.
LOG4CPLUS_EXPORT void convertToBuffer(SocketBuffer &buffer, const log4cplus::spi::InternalLoggingEvent &event, const log4cplus::tstring &serverName)
std::size_t const LOG4CPLUS_MAX_MESSAGE_SIZE
std::basic_string< tchar > tstring
SocketAppender(const log4cplus::tstring &host, unsigned short port, const log4cplus::tstring &serverName=tstring(), bool ipv6=false)
Sends spi::InternalLoggingEvent objects to a remote a log server.
LOG4CPLUS_EXPORT log4cplus::spi::InternalLoggingEvent readFromBuffer(SocketBuffer &buffer)
virtual void close()
Release any resources allocated within the appender such as file handles, network connections,...
SocketAppender(const log4cplus::helpers::Properties &properties)
virtual helpers::Socket & ctcGetSocket()
virtual void ctcSetConnected()
Sets connected flag to true in ConnectorThread's client.
helpers::SharedObjectPtr< helpers::ConnectorThread > connector
The internal representation of logging events.
Interface implemented by users of ConnectorThread.
log4cplus::helpers::Socket socket
virtual thread::Mutex const & ctcGetAccessMutex() const
virtual helpers::Socket ctcConnect()
Extend this class for implementing your own strategies for printing log statements.
log4cplus::tstring serverName