16 #ifndef MONITORING_MONINFOLOGGER_H 17 #define MONITORING_MONINFOLOGGER_H 55 loggerInstance.setDate();
56 loggerInstance.setSeverity(severity);
57 return loggerInstance;
62 static auto End() -> decltype(
"\033[0m\n")
69 std::ostream& mStream;
72 MonLogger(std::ostream& oStream = std::cout) : mStream(oStream)
79 auto now = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
80 mStream << std::put_time(std::localtime(&now),
"%Y-%m-%d %X") <<
"\t";
87 mStream <<
"\033[1;" <<
static_cast<int>(severity) <<
"m";
100 #endif //MONITORING_MONINFOLOGGER_H static auto End() -> decltype("\033[0m\n")
Definition: MonLogger.h:62
Simple Monitoring logging class.
Definition: MonLogger.h:35
Severity
List of possible log severities.
Definition: MonLogger.h:30
MonLogger & operator<<(const T &log)
Definition: MonLogger.h:42
static MonLogger & Get(Severity severity=Severity::Info)
Definition: MonLogger.h:52