45 mStream.open(mFileName.c_str(), std::ios_base::out);
62 if (mStream.is_open())
68 if (mStream.is_open())
72 void FileLogListener::log(
const std::string& _section,
LogLevel _level,
const struct tm* _time,
const std::string& _message,
const char* _file,
int _line)
74 if (mStream.is_open())
76 const char* separator =
" | ";
77 mStream << std::setw(2) << std::setfill(
'0') << _time->tm_hour <<
":"
78 << std::setw(2) << std::setfill(
'0') << _time->tm_min <<
":"
79 << std::setw(2) << std::setfill(
'0') << _time->tm_sec << separator
80 << _section << separator << _level.
print() << separator
81 << _message << separator << _file << separator << _line << std::endl;