From 2c2c1b0a17ae312bbd201bcf1b7e2e6592dd9d42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Thu, 27 Oct 2016 17:00:34 +0200 Subject: Revert "GH-1665 diagnostic build - disable file logging entirely" This reverts commit 049317093629f9a24ccec93df4449ce44b83c35e. --- application/MultiMC.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/application/MultiMC.cpp b/application/MultiMC.cpp index 7b4635f1..0911fcc2 100644 --- a/application/MultiMC.cpp +++ b/application/MultiMC.cpp @@ -429,13 +429,11 @@ 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); } @@ -453,7 +451,7 @@ void MultiMC::initLogger() logFile = std::make_shared(logBase.arg(0)); logFile->open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate); - if(!logFile->isOpen()) + if(!logFile || !logFile->isOpen()) { QTextStream(stderr) << "Couldn't open log file for writing: " << logBase.arg(0).toLocal8Bit(); fflush(stderr); -- cgit v1.2.3