libcommonc++  0.7
SystemLog Class Reference

The system event log. More...

#include <SystemLog.h++>

Public Types

enum  LogSeverity { LogInfo, LogWarning, LogError }
 System logging severity. More...
 

Public Member Functions

 SystemLog ()
 Construct a new SystemLog. More...
 
 ~SystemLog ()
 Destructor. More...
 
void open ()
 Open the log. More...
 
void close ()
 Close the log. More...
 
void logMessage (LogSeverity severity, const char *msg, va_list args)
 Log a message. More...
 
void logMessage (LogSeverity severity, const char *msg,...)
 Log a message. More...
 

Detailed Description

The system event log.

This class logs events to syslog on POSIX systems and to the Windows event log on Windows systems. This class is implicitly a singleton.

Author
Mark Lindner

Member Enumeration Documentation

◆ LogSeverity

System logging severity.

Enumerator
LogInfo 
LogWarning 
LogError 

Constructor & Destructor Documentation

◆ SystemLog()

SystemLog ( )

Construct a new SystemLog.

◆ ~SystemLog()

~SystemLog ( )

Destructor.

Member Function Documentation

◆ close()

void close ( )

Close the log.

◆ logMessage() [1/2]

void logMessage ( LogSeverity  severity,
const char *  msg,
va_list  args 
)

Log a message.

Parameters
severityThe message severity.
msgThe message.
argsOptional message arguments.

◆ logMessage() [2/2]

void logMessage ( LogSeverity  severity,
const char *  msg,
  ... 
)

Log a message.

Parameters
severityThe message severity.
msgThe message.
...Optional message arguments.

◆ open()

void open ( )

Open the log.


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