|
fastcgi++
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) {} |
| #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 DIAG_LOG | ( | data | ) | {} |
Definition at line 158 of file log.hpp.
Referenced by Fastcgipp::Manager_base::Manager_base(), Fastcgipp::Manager_base::signalHandler(), Fastcgipp::SocketGroup::SocketGroup(), Fastcgipp::Manager_base::start(), Fastcgipp::Transceiver::Transceiver(), Fastcgipp::Manager_base::~Manager_base(), Fastcgipp::SocketGroup::~SocketGroup(), and Fastcgipp::Transceiver::~Transceiver().
| #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.
Definition at line 107 of file log.hpp.
Referenced by Fastcgipp::SocketGroup::connect(), Fastcgipp::SocketGroup::createSocket(), Fastcgipp::FcgiStreambuf< charT, traits >::emptyBuffer(), Fastcgipp::Request< charT >::handler(), Fastcgipp::SocketGroup::listen(), Fastcgipp::Manager_base::localHandler(), Fastcgipp::operator<<(), Fastcgipp::SocketGroup::poll(), Fastcgipp::Request< charT >::setLocale(), and Fastcgipp::Socket::Socket().
| #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.
Definition at line 91 of file log.hpp.
Referenced by Fastcgipp::SocketGroup::createSocket(), Fastcgipp::Manager_base::Manager_base(), Fastcgipp::SocketGroup::poll(), and Fastcgipp::SocketGroup::wake().
| #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.
Definition at line 124 of file log.hpp.
Referenced by Fastcgipp::Http::Address::assign(), Fastcgipp::Logging::getHostname(), Fastcgipp::Logging::getProgram(), Fastcgipp::Request< charT >::handler(), Fastcgipp::SocketGroup::poll(), Fastcgipp::Manager_base::push(), Fastcgipp::Socket::read(), Fastcgipp::Manager_base::signalHandler(), Fastcgipp::Http::vecToString(), and Fastcgipp::Socket::write().
1.8.11