GH-1665 diagnostic build - disable file logging entirely

This commit is contained in:
Petr Mrázek 2016-10-27 13:40:53 +02:00
parent 2597bde4f9
commit 0493170936

View File

@ -429,11 +429,13 @@ void appDebugOutput(QtMsgType type, const QMessageLogContext &context, const QSt
QString out = format.arg(buf).arg(levels[type]).arg(msg);
/*
if(MMC->logFile && MMC->logFile->isOpen())
{
MMC->logFile->write(out.toUtf8());
MMC->logFile->flush();
}
*/
QTextStream(stderr) << out.toLocal8Bit();
fflush(stderr);
}
@ -451,7 +453,7 @@ void MultiMC::initLogger()
logFile = std::make_shared<QFile>(logBase.arg(0));
logFile->open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate);
if(!logFile || !logFile->isOpen())
if(!logFile->isOpen())
{
QTextStream(stderr) << "Couldn't open log file for writing: " << logBase.arg(0).toLocal8Bit();
fflush(stderr);