From aa05ce40f836da53633e4e2a08337ea05f662415 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 3 Dec 2018 10:24:56 +0100 Subject: [PATCH] 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 --- src/gui/application.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/application.cpp b/src/gui/application.cpp index 2dce5bab86..91d44dc466 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -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()); }