Logging: do not write to a temporary logdir if --logfile is passed

I guess the logger->isLoggingToFile was supposed to check that.
But this is not returning the right value if we did not enter the
logfile already.

Issue #6909
This commit is contained in:
Olivier Goffart 2018-12-03 10:24:56 +01:00 committed by Markus Goetz
parent 8fac2bf5d1
commit aa05ce40f8

View File

@ -483,12 +483,12 @@ void Application::setupLogging()
logger->setLogExpire(_logExpire);
logger->setLogFlush(_logFlush);
logger->setLogDebug(_logDebug);
logger->enterNextLogFile();
if (!logger->isLoggingToFile() && ConfigFile().automaticLogDir()) {
logger->setupTemporaryFolderLogDir();
logger->enterNextLogFile();
}
logger->enterNextLogFile();
qCInfo(lcApplication) << QString::fromLatin1("################## %1 locale:[%2] ui_lang:[%3] version:[%4] os:[%5]").arg(_theme->appName()).arg(QLocale::system().name()).arg(property("ui_lang").toString()).arg(_theme->version()).arg(Utility::platformName());
}