|
automotive-message-broker
0.14.803
|
Simple logger to log messages on file and console. More...
#include <logger.h>
Public Types | |
| enum | Level { EError = 0, EWarning, EMessage, EInfo, ETrace, EDebug } |
| typedef loggerConf_ | loggerConf |
Public Member Functions | |
| void | print (const unsigned int verbosityLevel, const std::string &sourceFile, const int codeLine, const std::string &message) |
| void | configure (const std::string &outputFile, const loggerConf configuration, const int fileVerbosityLevel, const int screenVerbosityLevel) |
| void | flush () |
Static Public Member Functions | |
| static Logger & | getInstance () |
Static Public Attributes | |
| static const loggerConf | file_on = L_nofile_ |
| static const loggerConf | file_off = L_file_ |
| static const loggerConf | screen_on = L_noscreen_ |
| static const loggerConf | screen_off = L_screen_ |
Simple logger to log messages on file and console.
This is the implementation of a simple logger in C++. It is implemented as a Singleton, so it can be easily called through two DEBUG macros. It is Pthread-safe. It allows to log on both file and screen, and to specify a verbosity threshold for both of them.
| typedef loggerConf_ CUtil::Logger::loggerConf |
Type used for the configuration
| enum CUtil::Logger::Level |
Logging level
|
inline |
Flush output buffer
|
static |
Enable logging to file
|
static |
Disable logging to file
|
static |
Disable logging to screen
|
static |
Enable logging to screen
1.8.2