MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / appDebugOutput

Function appDebugOutput

launcher/Application.cpp:173–185  ·  view source on GitHub ↗

This is used so that we can output to the log file in addition to the CLI. */

Source from the content-addressed store, hash-verified

171
172/** This is used so that we can output to the log file in addition to the CLI. */
173void appDebugOutput(QtMsgType type, const QMessageLogContext& context, const QString& msg)
174{
175 static std::mutex loggerMutex;
176 const std::lock_guard<std::mutex> lock(loggerMutex); // synchronized, QFile logFile is not thread-safe
177
178 QString out = qFormatLogMessage(type, context, msg);
179 out += QChar::LineFeed;
180
181 APPLICATION->logFile->write(out.toUtf8());
182 APPLICATION->logFile->flush();
183 QTextStream(stderr) << out.toLocal8Bit();
184 fflush(stderr);
185}
186
187} // namespace
188

Callers

nothing calls this directly

Calls 2

writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected