Logger class, allows to override way in which messages from OpenAB will be logged.
More...
#include <Log.hpp>
Logger class, allows to override way in which messages from OpenAB will be logged.
Enumerator |
---|
Fatal |
Fatal messages
|
Error |
Error messages
|
Warning |
Warning messages
|
Info |
Info messages
|
Verbose |
Verbose messages
|
DebugF |
Debug messages with current function name
|
Debug |
Debug messages
|
OpenAB::Logger::Logger |
( |
| ) |
|
OpenAB::Logger::~Logger |
( |
| ) |
|
|
virtual |
Destructor, virtual by default.
Returns Logger reference set to print messages in given LogLevel.
- Parameters
-
- Returns
- reference to Logger
Logger * OpenAB::Logger::getDefaultLogger |
( |
| ) |
|
|
static |
Returns pointer to currently set default logger. There can be only one default logger set at the time.
- Returns
- Pointer to currently set logger, or NULL if no logger was set.
template<typename T >
Logger& OpenAB::Logger::operator<< |
( |
T |
data | ) |
|
|
inline |
virtual Logger& OpenAB::Logger::operator<< |
( |
std::ostream &(*)(std::ostream &) |
pf | ) |
|
|
pure virtual |
Returns currently set LogLevel and allows to override it.
- Returns
- reference to currently set LogLevel
void OpenAB::Logger::setDefaultLogger |
( |
Logger * |
logger | ) |
|
|
static |
Sets new default logger.
- Parameters
-
[in] | logger | new logger to be used as default one. |
- Note
- OpenAB provides default logger that is used by default, until explicitly override by setDefaultLogger call.
std::ostringstream OpenAB::Logger::oss |
|
protected |
The documentation for this class was generated from the following files:
- /home/one/open-address-book/src/helpers/Log.hpp
- /home/one/open-address-book/src/helpers/Log.cpp