#pragma once class LogWriter { rFile m_logfile; void WriteToLog(const std::string& prefix, const std::string& value, u8 lvl); public: LogWriter(); template void Write(const std::string &fmt, Arg... args) { std::string frmt = fmt::Format(fmt, std::forward(args)...); WriteToLog("!", frmt, 2); } template void Error(const std::string &fmt, Arg... args) { std::string frmt = fmt::Format(fmt, std::forward(args)...); WriteToLog("E", frmt, 4); } template void Warning(const std::string &fmt, Arg... args) { std::string frmt = fmt::Format(fmt, std::forward(args)...); WriteToLog("W", frmt, 3); } template void Success(const std::string &fmt, Arg... args) { std::string frmt = fmt::Format(fmt, std::forward(args)...); WriteToLog("S", frmt, 1); } virtual void SkipLn(); }; extern LogWriter ConLog;