Syslog Class Reference

#include <Syslog.h>

Inherits Object, and Singleton< T >< Syslog >.

Inheritance diagram for Syslog:

Inheritance graph
[legend]
Collaboration diagram for Syslog:

Collaboration graph
[legend]
List of all members.

Public Member Functions

int log (const Severity severity, const String &msg)
int log (const Severity &severity, const String &timestamp, const String &fileName, const unsigned int lineNum, const String &functionName, const String &msg)
 SLOT (setTag, const String &)

Static Public Member Functions

static Facility facilityId (const String &facility)
static String facilityName (const Facility facility)
static String severityName (const Severity severity)

Private Member Functions

 REGISTRY (String, tag,"pylon", MAN_SYSLOG_TAG)
 REGISTRY (String, collector,"255.255.255.255", MAN_SYSLOG_COLLECTOR)
 REGISTRY (String, facility,"local5", MAN_SYSLOG_FACILITY)
 Syslog ()
virtual ~Syslog ()

Private Attributes

String _tag
UdpConnection_connection
unsigned int _facility

Friends

class Singleton< Syslog >

Detailed Description

Definition at line 107 of file Syslog.h.


Constructor & Destructor Documentation

Syslog::Syslog (  )  [private]

Definition at line 229 of file Syslog.cpp.

References _connection, _facility, _tag, BIND, CONNECT, CSTRING(), ERROR, ERROR_BACKTRACE(), facilityId(), FAILED(), Support::failure(), Support::failureCode(), MSG_OBJECT_CANNOT_CREATE, REGISTRY_GET, UdpConnection::setBroadcast(), and SYSLOG_PORT.

Syslog::~Syslog (  )  [private, virtual]

Definition at line 276 of file Syslog.cpp.

References _connection.


Member Function Documentation

int Syslog::log ( const Severity  severity,
const String msg 
)

Definition at line 16 of file Syslog.cpp.

References _connection, _facility, _tag, ERROR_BACKTRACE(), FAILED(), Connection::localIp(), OK, SYSLOG_LIMIT_MSG_SIZE_MAX, SYSLOG_LIMIT_TIMESTAMP_SIZE_MAX, and Connection::writeStr().

int Syslog::log ( const Severity severity,
const String timestamp,
const String fileName,
const unsigned int  lineNum,
const String functionName,
const String msg 
)

Definition at line 34 of file Syslog.cpp.

References _connection, _facility, _tag, CSTRING(), ERROR_BACKTRACE(), FAILED(), Connection::localIp(), OK, SYSLOG_LIMIT_MSG_SIZE_MAX, and Connection::writeStr().

Facility Syslog::facilityId ( const String facility  )  [static]

Definition at line 51 of file Syslog.cpp.

References FACILITY_CLOCK, FACILITY_CLOCK2, FACILITY_DAEMON, FACILITY_FTP, FACILITY_KERNEL, FACILITY_LOCAL0, FACILITY_LOCAL1, FACILITY_LOCAL2, FACILITY_LOCAL3, FACILITY_LOCAL4, FACILITY_LOCAL5, FACILITY_LOCAL6, FACILITY_LOCAL7, FACILITY_LOG_ALERT, FACILITY_LOG_AUDIT, FACILITY_MAIL, FACILITY_NEWS, FACILITY_NTP, FACILITY_PRINTER, FACILITY_SECURITY, FACILITY_SECURITY2, FACILITY_SYSLOG, FACILITY_USER, and FACILITY_UUCP.

Referenced by Syslog().

String Syslog::facilityName ( const Facility  facility  )  [static]

Definition at line 105 of file Syslog.cpp.

References FACILITY_CLOCK, FACILITY_CLOCK2, FACILITY_DAEMON, FACILITY_FTP, FACILITY_KERNEL, FACILITY_LOCAL0, FACILITY_LOCAL1, FACILITY_LOCAL2, FACILITY_LOCAL3, FACILITY_LOCAL4, FACILITY_LOCAL5, FACILITY_LOCAL6, FACILITY_LOCAL7, FACILITY_LOG_ALERT, FACILITY_LOG_AUDIT, FACILITY_MAIL, FACILITY_NEWS, FACILITY_NTP, FACILITY_PRINTER, FACILITY_SECURITY, FACILITY_SECURITY2, FACILITY_SYSLOG, FACILITY_USER, and FACILITY_UUCP.

String Syslog::severityName ( const Severity  severity  )  [static]

Definition at line 187 of file Syslog.cpp.

References SEVERITY_ALERT, SEVERITY_CRITICAL, SEVERITY_DEBUG, SEVERITY_EMERGENCY, SEVERITY_ERROR, SEVERITY_INFO, SEVERITY_NOTICE, and SEVERITY_WARNING.

Syslog::SLOT ( setTag  ,
const String  
)

Syslog::REGISTRY ( String  ,
tag  ,
"pylon"  ,
MAN_SYSLOG_TAG   
) [private]

Syslog::REGISTRY ( String  ,
collector  ,
"255.255.255.255"  ,
MAN_SYSLOG_COLLECTOR   
) [private]

Syslog::REGISTRY ( String  ,
facility  ,
"local5"  ,
MAN_SYSLOG_FACILITY   
) [private]


Friends And Related Function Documentation

friend class Singleton< Syslog > [friend]

Definition at line 112 of file Syslog.h.


Member Data Documentation

String Syslog::_tag [private]

Definition at line 137 of file Syslog.h.

Referenced by log(), and Syslog().

UdpConnection* Syslog::_connection [private]

Definition at line 138 of file Syslog.h.

Referenced by log(), Syslog(), and ~Syslog().

unsigned int Syslog::_facility [private]

Definition at line 139 of file Syslog.h.

Referenced by log(), and Syslog().


The documentation for this class was generated from the following files:
Generated on Thu Sep 6 20:13:58 2007 for Pylon Application Platform by  doxygen 1.5.1