#include <syslog.h>
Inheritance diagram for PSystemLogTarget:
Public Member Functions | |
Construction | |
PSystemLogTarget () | |
Miscellaneous functions | |
void | SetThresholdLevel (PSystemLog::Level level) |
Set the level at which errors are logged. | |
PSystemLog::Level | GetThresholdLevel () const |
Get the current level for logging. | |
Protected Member Functions | |
Output functions | |
virtual void | Output (PSystemLog::Level level, const char *msg)=0 |
Log an error into the system log. | |
void | OutputToStream (ostream &strm, PSystemLog::Level level, const char *msg) |
Log an error into the specified stream. | |
Protected Attributes | |
PSystemLog::Level | m_thresholdLevel |
PSystemLogTarget::PSystemLogTarget | ( | ) |
PSystemLog::Level PSystemLogTarget::GetThresholdLevel | ( | ) | const [inline] |
Get the current level for logging.
virtual void PSystemLogTarget::Output | ( | PSystemLog::Level | level, | |
const char * | msg | |||
) | [protected, pure virtual] |
Log an error into the system log.
level | Level of this message |
msg | Message to be logged |
Implemented in PSystemLogToNowhere, PSystemLogToStderr, PSystemLogToFile, PSystemLogToNetwork, and PSystemLogToSyslog.
void PSystemLogTarget::OutputToStream | ( | ostream & | strm, | |
PSystemLog::Level | level, | |||
const char * | msg | |||
) | [protected] |
Log an error into the specified stream.
strm | Stream to output |
level | Level of this message |
msg | Message to be logged |
void PSystemLogTarget::SetThresholdLevel | ( | PSystemLog::Level | level | ) | [inline] |
Set the level at which errors are logged.
Only messages higher than or equal to the specified level will be logged.
level | New log level |
PSystemLog::Level PSystemLogTarget::m_thresholdLevel [protected] |