Log to the standard error. More...
#include <string>

Macros | |
| #define | LOG(level, msg) Log((level), (msg), strrchr("/" __FILE__, '/') + 1, __LINE__) |
Enumerations | |
| enum | LogLevel { VERBOSE, INFO, WARNING, ERROR, FATAL, UNKNOWN } |
Functions | |
| void | Log (LogLevel level, const std::string &msg, const std::string &file, int lineno) |
| Workhorse of logging. More... | |
Log to the standard error.
| #define LOG | ( | level, | |
| msg | |||
| ) | Log((level), (msg), strrchr("/" __FILE__, '/') + 1, __LINE__) |
| enum LogLevel |
| void Log | ( | LogLevel | level, |
| const std::string & | msg, | ||
| const std::string & | file, | ||
| int | lineno | ||
| ) |
Workhorse of logging.
The log shows not only its content and level, but the file and the line where it was generated as well.
| level | level of the log, namely |
VERBOSEINFOWARNINGERRORFATALUNKNOWNThese names are quite self-explanatory.
| msg | content of the message |
| file | the file from which the log is generated |
| lineno | the line at which the log is generated |
LOG macro as follows.