fastcgi++
A C++ FastCGI/Web API
Enumerations | Functions | Variables
Fastcgipp::Logging Namespace Reference

Contains the Fastcgipp debugging/logging mechanism. More...

Enumerations

enum  Level {
  INFO = 0, FAIL = 1, ERROR = 2, WARNING = 3,
  DEBUG = 4, DIAG = 5
}
 Communicate the log level to the header generator. More...
 

Functions

std::wstring getHostname ()
 
std::wstring getProgram ()
 
void header (Level level)
 Send a log header to logstream. More...
 

Variables

std::array< std::wstring, 6 > levels
 
std::wostream * logstream
 The actual stream we will be logging to. More...
 
std::mutex mutex
 Thread safe the logging mechanism. More...
 
std::wstring hostname
 Hostname to use in logging. More...
 
std::wstring program
 Application name to use in loggin. More...
 
bool suppress
 Set to true if you want to suppress non-error logs. More...
 

Detailed Description

Contains the Fastcgipp debugging/logging mechanism.

Enumeration Type Documentation

Communicate the log level to the header generator.

Enumerator
INFO 
FAIL 
ERROR 
WARNING 
DEBUG 
DIAG 

Definition at line 61 of file log.hpp.

Function Documentation

std::wstring Fastcgipp::Logging::getHostname ( )

Definition at line 49 of file log.cpp.

References WARNING_LOG.

std::wstring Fastcgipp::Logging::getProgram ( )

Definition at line 68 of file log.cpp.

References levels, and WARNING_LOG.

void Fastcgipp::Logging::header ( Level  level)

Variable Documentation

std::wstring Fastcgipp::Logging::hostname

Hostname to use in logging.

Referenced by header().

std::array<std::wstring, 6> Fastcgipp::Logging::levels
Initial value:
{{
L"[info]: ",
L"[fail]: ",
L"[error]: ",
L"[warning]: ",
L"[debug]: ",
L"[diagnostic]: "
}}

Definition at line 90 of file log.cpp.

Referenced by getProgram(), and header().

std::wostream* Fastcgipp::Logging::logstream

The actual stream we will be logging to.

Referenced by header().

std::mutex Fastcgipp::Logging::mutex

Thread safe the logging mechanism.

Definition at line 102 of file log.cpp.

std::wstring Fastcgipp::Logging::program

Application name to use in loggin.

Referenced by header().

bool Fastcgipp::Logging::suppress

Set to true if you want to suppress non-error logs.