24 #ifndef LOG4CPLUS_SYSLOG_APPENDER_HEADER_
25 #define LOG4CPLUS_SYSLOG_APPENDER_HEADER_
29 #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE)
86 #if ! defined (LOG4CPLUS_SINGLE_THREADED)
99 #if defined (LOG4CPLUS_HAVE_SYSLOG_H)
106 int port,
const tstring & facility,
119 #if defined (LOG4CPLUS_HAVE_SYSLOG_H)
146 #if ! defined (LOG4CPLUS_SINGLE_THREADED)
160 std::string identStr;
Extend this class for implementing your own strategies for printing log statements.
Appends log events to a file.
virtual void ctcSetConnected()
Sets connected flag to true in ConnectorThread's client.
virtual thread::Mutex const & ctcGetAccessMutex() const
AppendFuncType appendFunc
SysLogAppender(const log4cplus::helpers::Properties &properties)
RemoteSyslogType
Remote syslog IP protocol type.
virtual ~SysLogAppender()
void appendLocal(const spi::InternalLoggingEvent &event)
Local syslog (served by syslog()) worker function.
void appendRemote(const spi::InternalLoggingEvent &event)
Remote syslog worker function.
virtual int getSysLogLevel(const LogLevel &ll) const
SysLogAppender(const tstring &ident)
SysLogAppender(const tstring &ident, const tstring &host, int port=514, const tstring &facility=tstring(), RemoteSyslogType remoteSyslogType=RSTUdp, bool ipv6=false)
virtual helpers::Socket ctcConnect()
static tstring const remoteTimeFormat
helpers::Socket syslogSocket
RemoteSyslogType remoteSyslogType
virtual void close()
Release any resources allocated within the appender such as file handles, network connections,...
virtual void append(const spi::InternalLoggingEvent &event)
Subclasses of Appender should implement this method to perform actual logging.
SysLogAppender(const tstring &ident, const tstring &host, int port, const tstring &facility, RemoteSyslogType remoteSyslogType, bool ipv6, bool fqdn)
virtual helpers::Socket & ctcGetSocket()
helpers::SharedObjectPtr< helpers::ConnectorThread > connector
Interface implemented by users of ConnectorThread.
This class implements client sockets (also called just "sockets").
The internal representation of logging events.
std::basic_string< tchar > tstring
int LogLevel
Defines the minimum set of priorities recognized by the system, that is FATAL_LOG_LEVEL,...