MCPcopy Create free account
hub / github.com/Norbyte/bg3se / OpenLogFile

Method OpenLogFile

CoreLib/Console.cpp:133–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133void Console::OpenLogFile(std::wstring const& path)
134{
135 if (logToFile_) {
136 CloseLogFile();
137 }
138
139 logFile_.rdbuf()->pubsetbuf(0, 0);
140 logFile_.open(path.c_str(), std::ios::binary | std::ios::out | std::ios::app);
141 if (!logFile_.good()) {
142 ERR("Failed to open log file '%s'", ToStdUTF8(path).c_str());
143 } else {
144 logToFile_ = true;
145 }
146}
147
148void Console::CloseLogFile()
149{

Callers 2

InitRuntimeLoggingMethod · 0.80
InitRuntimeLoggingMethod · 0.80

Calls 1

ToStdUTF8Function · 0.85

Tested by

no test coverage detected