fastcgi++
3.1alpha
A C++ FastCGI/Web API
|
Declares the Fastcgipp debugging/logging facilities. More...
#include "fastcgi++/config.hpp"
#include <ostream>
#include <mutex>
#include <cstdlib>
#include <string>
Go to the source code of this file.
Namespaces | |
Fastcgipp | |
Topmost namespace for the fastcgi++ library. | |
Fastcgipp::Logging | |
Contains the Fastcgipp debugging/logging mechanism. | |
Macros | |
#define | INFO_LOG(data) |
This is for the user to log whatever they want. More... | |
#define | FAIL_LOG(data) |
Log any "errors" that cannot be recovered from and then exit. More... | |
#define | ERROR_LOG(data) |
Log any "errors" that can be recovered from. More... | |
#define | WARNING_LOG(data) |
Log any externally caused "errors". More... | |
#define | DEBUG_LOG(data) |
The intention here is for general debug/analysis logging. More... | |
#define | DIAG_LOG(data) {} |
Enumerations | |
enum | Fastcgipp::Logging::Level { Fastcgipp::Logging::INFO = 0, Fastcgipp::Logging::FAIL = 1, Fastcgipp::Logging::ERROR = 2, Fastcgipp::Logging::WARNING = 3, Fastcgipp::Logging::DEBUG = 4, Fastcgipp::Logging::DIAG = 5 } |
Communicate the log level to the header generator. More... | |
Functions | |
void | Fastcgipp::Logging::header (Level level) |
Send a log header to logstream. More... | |
Variables | |
std::wostream * | Fastcgipp::Logging::logstream |
The actual stream we will be logging to. More... | |
std::mutex | Fastcgipp::Logging::mutex |
Thread safe the logging mechanism. More... | |
std::wstring | Fastcgipp::Logging::hostname |
Hostname to use in logging. More... | |
std::wstring | Fastcgipp::Logging::program |
Application name to use in loggin. More... | |
bool | Fastcgipp::Logging::suppress |
Set to true if you want to suppress non-error logs. More... | |
Declares the Fastcgipp debugging/logging facilities.
Definition in file log.hpp.
#define DEBUG_LOG | ( | data | ) |
The intention here is for general debug/analysis logging.
#define ERROR_LOG | ( | data | ) |
Log any "errors" that can be recovered from.
This should encompass all errors that should never happen, regardless of what the external conditions are. This also presumes that there is a mechanism to recover from said error.
#define FAIL_LOG | ( | data | ) |
Log any "errors" that cannot be recovered from and then exit.
This should encompass all errors that should never happen, regardless of what the external conditions are. This also presumes that there is no possibility to recover from the error and we should simply terminate.
#define INFO_LOG | ( | data | ) |
This is for the user to log whatever they want.
#define WARNING_LOG | ( | data | ) |
Log any externally caused "errors".
We allocate this "log level" to errors that are caused by external factors like bad data from a web server. Once can't say that these errors should never happen since they are external controlled.