MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / appDebugOutput

Function appDebugOutput

launcher/Application.cpp:142–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140
141namespace {
142void appDebugOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg)
143{
144 const char *levels = "DWCFIS";
145 const QString format("%1 %2 %3\n");
146
147 qint64 msecstotal = APPLICATION->timeSinceStart();
148 qint64 seconds = msecstotal / 1000;
149 qint64 msecs = msecstotal % 1000;
150 QString foo;
151 char buf[1025] = {0};
152 ::snprintf(buf, 1024, "%5lld.%03lld", seconds, msecs);
153
154 QString out = format.arg(buf).arg(levels[type]).arg(msg);
155
156 APPLICATION->logFile->write(out.toUtf8());
157 APPLICATION->logFile->flush();
158 QTextStream(stderr) << out.toLocal8Bit();
159 fflush(stderr);
160}
161
162QString getIdealPlatform(QString currentPlatform) {
163 auto info = Sys::getKernelInfo();

Callers

nothing calls this directly

Calls 2

timeSinceStartMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected