Classes | Public Member Functions | Static Public Attributes | Private Attributes

RemoteSyslogLogger Class Reference

#include <loggingRemoteSyslog.h>

Inheritance diagram for RemoteSyslogLogger:
Inheritance graph
[legend]
Collaboration diagram for RemoteSyslogLogger:
Collaboration graph
[legend]

List of all members.

Classes

struct  facilityPair
 Structure used for facility name to int value mapping. More...

Public Member Functions

 RemoteSyslogLogger (int facility=LOG_USER)
virtual ~RemoteSyslogLogger (void)
 Destructor.
virtual int open (const ACE_TCHAR *host)
 Open a new connection.
virtual int reset (void)
 No-op for UDP.
virtual int close (void)
 No-op for UDP.
virtual ssize_t log (ACE_Log_Record &log_record)
virtual ssize_t log (int priority, const ACE_TCHAR *msg)
 Send log.
virtual const ACE_TCHAR * getIdentification ()
 Returns identification string, e.g. "Remote syslog".
virtual const ACE_TCHAR * getDestination ()
 Returns the destination of the logger, e.g. "dina.ijs.si".

Static Public Attributes

static facilityPair m_facilityNames []
 Facility name to int value mapping table.

Private Attributes

ACE_INET_Addr m_remoteAddress
 Remote address.
ACE_SOCK_Dgram m_socket
 UDP socket object.
int m_facility
 syslog facility.
ACE_CString m_address
 Remote address.

Detailed Description

Implements an ACE_Log_Msg_Backend that logs to a remote syslog using User Datagram Protocal (UDP).


Constructor & Destructor Documentation

RemoteSyslogLogger::RemoteSyslogLogger ( int  facility = LOG_USER  ) 

Constructor facility has to be already shifted left by 3 bits.

virtual RemoteSyslogLogger::~RemoteSyslogLogger ( void   )  [virtual]

Destructor.


Member Function Documentation

virtual int RemoteSyslogLogger::close ( void   )  [virtual]

No-op for UDP.

Implements CacheLogger.

virtual const ACE_TCHAR* RemoteSyslogLogger::getDestination (  )  [virtual]

Returns the destination of the logger, e.g. "dina.ijs.si".

Implements CacheLogger.

virtual const ACE_TCHAR* RemoteSyslogLogger::getIdentification (  )  [virtual]

Returns identification string, e.g. "Remote syslog".

Implements CacheLogger.

virtual ssize_t RemoteSyslogLogger::log ( int  priority,
const ACE_TCHAR *  msg 
) [virtual]

Send log.

Implements CacheLogger.

virtual ssize_t RemoteSyslogLogger::log ( ACE_Log_Record &  log_record  )  [virtual]

ACE_Log_Record with msg_data and priority set. Logs the record's msg_data() and maps ACE priority to syslog priority. ACE_Log_Record.msg_data() copies message (performacne concern).

Implements CacheLogger.

virtual int RemoteSyslogLogger::open ( const ACE_TCHAR *  host  )  [virtual]

Open a new connection.

Implements CacheLogger.

virtual int RemoteSyslogLogger::reset ( void   )  [virtual]

No-op for UDP.

Implements CacheLogger.


Member Data Documentation

ACE_CString RemoteSyslogLogger::m_address [private]

Remote address.

syslog facility.

Facility name to int value mapping table.

ACE_INET_Addr RemoteSyslogLogger::m_remoteAddress [private]

Remote address.

ACE_SOCK_Dgram RemoteSyslogLogger::m_socket [private]

UDP socket object.


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