25#ifndef SIM_TO_DUT_INTERFACE_INTERFACELOGGER_H
26#define SIM_TO_DUT_INTERFACE_INTERFACELOGGER_H
28#include "InterfaceLoggerConfig.h"
29#include "../Events/EventVisitor.h"
31#include "quill/Quill.h"
32#include "../Events/SimEvent.h"
124 static std::string CSV_HEADER;
127 static bool initialized;
130 static quill::Logger *consoleLogger;
131 static quill::Logger *consoleFileLogger;
132 static quill::Logger *dataLogger;
135 static quill::Handler *consoleHandler;
136 static quill::Handler *consoleFileHandler;
144 static quill::Handler *buildConsoleHandler(
bool enableDebugMode);
154 static quill::Handler *buildFileHandler(
const std::string &logPath,
bool enableDebugMode);
164 static quill::Logger *createConsoleLogger(
const char *name,
bool withFileHandler);
173 static quill::Logger *createDataLogger(
const std::string &logPath);
182 static void logWithLevel(quill::Logger *log, std::string msg,
LOG_LEVEL level);
189 static quill::Handler *getHandlerType(
LOG_TYPE type);
196 static std::string getCurrentTimestamp();
205 static std::string getLoggingPath(std::string logPath);
213 static std::string initializeLoggingPath(
const std::string &logPath);
227 static void removeOldLogfiles(
const std::string &directory,
int backupCount);
Logger to log to file, console and as structured data csv
Definition: InterfaceLogger.h:67
static void changeLogLevel(LOG_TYPE typ, LOG_LEVEL level)
Definition: InterfaceLogger.cpp:210
static void logMessage(const std::string &msg, LOG_LEVEL level)
Definition: InterfaceLogger.cpp:271
static void initializeLogger(const LoggerConfig &con)
Definition: InterfaceLogger.cpp:44
static void logEvent(sim_interface::SimEvent event)
Definition: InterfaceLogger.cpp:338
The logger needs a configuration before it can start logging.
Definition: InterfaceLoggerConfig.h:50
Event object used to communicate between simulation and DuTs.
Definition: SimEvent.h:47
Definition: CANConnector.cpp:29
LOG_TYPE
Definition: InterfaceLogger.h:45
LOG_LEVEL
Definition: InterfaceLoggerConfig.h:40