bref
API 2014 of the Zia HTTP server.
|
RAII class for the ILogger interface. More...
#include <ScopedLogger.h>
Public Member Functions | |
ScopedLogger (ILogger *logger, ILogger::Severity severity) | |
Create a ScopeLogger targetting a given logger and severity. | |
~ScopedLogger () | |
Write the message to the logger. | |
std::ostream & | log () |
Retrieve the output stream of the scoped logger. | |
Private Attributes | |
std::stringstream | ss_ |
ILogger * | logger_ |
ILogger::Severity | severity_ |
RAII class for the ILogger interface.
bref::ScopedLogger::ScopedLogger | ( | ILogger * | logger, |
ILogger::Severity | severity | ||
) | [inline] |
Create a ScopeLogger targetting a given logger and severity.
logger | The logger where the message should be written. |
severity | The severity of the message. |
bref::ScopedLogger::~ScopedLogger | ( | ) | [inline] |
Write the message to the logger.
This is where the stream is actually logged.
std::ostream& bref::ScopedLogger::log | ( | ) | [inline] |
Retrieve the output stream of the scoped logger.