31 static const std::regex ansiRegex(
"\033\\[[0-9;]*m");
32 return std::regex_replace(str, ansiRegex,
"");
Defines the Logger class for console and file output.
static std::string stripAnsi(const std::string &str)
Remove ANSI escape sequences from a string.
static std::ofstream logFile_
static bool init(const std::string &filename)
Initialize the logger with an output file.
static void log(const std::string &message)
Write a message to both console and log file.
static void close()
Close the log file.