PTLib  Version 2.10.4
PSystemLog Class Reference

This class abstracts the operating system dependent error logging facility. More...

#include <syslog.h>

Inheritance diagram for PSystemLog:
PObject

List of all members.

Static Public Member Functions

Miscellaneous functions
static PSystemLogTargetGetTarget ()
 Get the current target/destination for system logging.
static void SetTarget (PSystemLogTarget *target, bool autoDelete=true)
 Set the current target/destination for system logging.

Construction

enum  Level {
  StdError = -1, Fatal, Error, Warning,
  Info, Debug, Debug2, Debug3,
  Debug4, Debug5, Debug6, NumLogLevels
}
 define the different error log levels More...
 PSystemLog (Level level)
 Create a system log stream.
 ~PSystemLog ()
 Destroy the string stream, deleting the stream buffer.

Detailed Description

This class abstracts the operating system dependent error logging facility.

To send messages to the system error log, the PSYSTEMLOG macro should be used.


Member Enumeration Documentation

define the different error log levels

Enumerator:
StdError 

Log from standard error stream.

Fatal 

Log a fatal error.

Error 

Log a non-fatal error.

Warning 

Log a warning.

Info 

Log general information.

Debug 

Log debugging information.

Debug2 

Log more debugging information.

Debug3 

Log even more debugging information.

Debug4 

Log a lot of debugging information.

Debug5 

Log a real lot of debugging information.

Debug6 

Log a bucket load of debugging information.

NumLogLevels 

Constructor & Destructor Documentation

Create a system log stream.

Parameters:
levelonly messages at this level or higher will be logged

Destroy the string stream, deleting the stream buffer.


Member Function Documentation

Get the current target/destination for system logging.

Referenced by PServiceProcess::GetLogLevel(), and PServiceProcess::SetLogLevel().

static void PSystemLog::SetTarget ( PSystemLogTarget target,
bool  autoDelete = true 
) [static]

Set the current target/destination for system logging.

Parameters:
targetNew target/destination for logging.
autoDeleteIndicate target is to be deleted when no longer in use.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines