22 mStream.open(mFileName.c_str(), std::ios_base::out);
39 if (mStream.is_open())
45 if (mStream.is_open())
49 void FileLogListener::log(
const std::string& _section,
LogLevel _level,
const struct tm* _time,
const std::string& _message,
const char* _file,
int _line)
51 if (mStream.is_open())
53 const char* separator =
" | ";
54 mStream << std::setw(2) << std::setfill(
'0') << _time->tm_hour <<
":"
55 << std::setw(2) << std::setfill(
'0') << _time->tm_min <<
":"
56 << std::setw(2) << std::setfill(
'0') << _time->tm_sec << separator
57 << _section << separator << _level.
print() << separator
58 << _message << separator << _file << separator << _line << std::endl;
void setFileName(const std::string &_value)
void log(const std::string &_section, LogLevel _level, const struct tm *_time, const std::string &_message, const char *_file, int _line) override
const std::string & getFileName() const
std::string print() const