MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / write

Method write

source/utils/LogSinkFile.cpp:35–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35void LogSinkFile::write(LogMessageLevel level, const std::string& module, const std::string& timestamp, const std::string& filename, int line, const std::string& message)
36{
37 if (!mFile.is_open())
38 return;
39
40 mFile
41 << "(" << timestamp << ") "
42 << "(" << module << ") "
43 << "[" << LogMessageLevelToString(level) << "] ";
44
45 if (level >= LogMessageLevel::WARNING)
46 mFile << "(" << filename << ":" << line << ") ";
47
48 mFile
49 << message
50 << std::endl;
51
52 mFile.flush();
53}

Callers

nothing calls this directly

Calls 1

LogMessageLevelToStringFunction · 0.85

Tested by

no test coverage detected