Revert "GH-1665 diagnostic build - disable file logging entirely"
This reverts commit 0493170936
.
This commit is contained in:
parent
0493170936
commit
2c2c1b0a17
@ -429,13 +429,11 @@ void appDebugOutput(QtMsgType type, const QMessageLogContext &context, const QSt
|
|||||||
|
|
||||||
QString out = format.arg(buf).arg(levels[type]).arg(msg);
|
QString out = format.arg(buf).arg(levels[type]).arg(msg);
|
||||||
|
|
||||||
/*
|
|
||||||
if(MMC->logFile && MMC->logFile->isOpen())
|
if(MMC->logFile && MMC->logFile->isOpen())
|
||||||
{
|
{
|
||||||
MMC->logFile->write(out.toUtf8());
|
MMC->logFile->write(out.toUtf8());
|
||||||
MMC->logFile->flush();
|
MMC->logFile->flush();
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
QTextStream(stderr) << out.toLocal8Bit();
|
QTextStream(stderr) << out.toLocal8Bit();
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
@ -453,7 +451,7 @@ void MultiMC::initLogger()
|
|||||||
|
|
||||||
logFile = std::make_shared<QFile>(logBase.arg(0));
|
logFile = std::make_shared<QFile>(logBase.arg(0));
|
||||||
logFile->open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate);
|
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();
|
QTextStream(stderr) << "Couldn't open log file for writing: " << logBase.arg(0).toLocal8Bit();
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
|
Loading…
Reference in New Issue
Block a user