22 mStream.open(mFileName.c_str(), std::ios_base::out);
39 if (mStream.is_open())
45 if (mStream.is_open())
50 std::string_view _section,
52 const struct tm* _time,
53 std::string_view _message,
54 std::string_view _file,
57 if (mStream.is_open())
59 std::string_view separator =
" | ";
60 mStream << std::setw(2) << std::setfill(
'0') << _time->tm_hour <<
":" << std::setw(2) << std::setfill(
'0')
61 << _time->tm_min <<
":" << std::setw(2) << std::setfill(
'0') << _time->tm_sec << separator
62 << _section << separator << _level.
print() << separator << _message << separator << _file
63 << separator << _line << std::endl;
void setFileName(std::string_view _value)
void log(std::string_view _section, LogLevel _level, const struct tm *_time, std::string_view _message, std::string_view _file, int _line) override
const std::string & getFileName() const
std::string_view print() const