summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-10-27 17:00:34 +0200
committerPetr Mrázek <peterix@gmail.com>2016-10-27 17:00:34 +0200
commit2c2c1b0a17ae312bbd201bcf1b7e2e6592dd9d42 (patch)
treec94c65399e9d6ada67aed0d777693cc4356824da /application
parent049317093629f9a24ccec93df4449ce44b83c35e (diff)
downloadMultiMC-2c2c1b0a17ae312bbd201bcf1b7e2e6592dd9d42.tar
MultiMC-2c2c1b0a17ae312bbd201bcf1b7e2e6592dd9d42.tar.gz
MultiMC-2c2c1b0a17ae312bbd201bcf1b7e2e6592dd9d42.tar.lz
MultiMC-2c2c1b0a17ae312bbd201bcf1b7e2e6592dd9d42.tar.xz
MultiMC-2c2c1b0a17ae312bbd201bcf1b7e2e6592dd9d42.zip
Revert "GH-1665 diagnostic build - disable file logging entirely"
This reverts commit 049317093629f9a24ccec93df4449ce44b83c35e.
Diffstat (limited to 'application')
-rw-r--r--application/MultiMC.cpp4
1 files changed, 1 insertions, 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<QFile>(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);