From 2d85c86066286742f14ee9c94cebb0c0cb163f16 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Fri, 25 Oct 2024 22:45:12 +0800 Subject: [PATCH] Do not alter the user's debug and expiration settings when changing temporary log dir setting Signed-off-by: Claudio Cambra --- src/libsync/logger.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/libsync/logger.cpp b/src/libsync/logger.cpp index 86f482fffe49..5e885d7afebe 100644 --- a/src/libsync/logger.cpp +++ b/src/libsync/logger.cpp @@ -234,10 +234,9 @@ QString Logger::temporaryFolderLogDirPath() const void Logger::setupTemporaryFolderLogDir() { auto dir = temporaryFolderLogDirPath(); - if (!QDir().mkpath(dir)) + if (!QDir().mkpath(dir)) { return; - setLogDebug(true); - setLogExpire(4 /*hours*/); + } setLogDir(dir); _temporaryFolderLogDir = true; } @@ -249,8 +248,6 @@ void Logger::disableTemporaryFolderLogDir() enterNextLogFile("nextcloud.log", LogType::Log); setLogDir(QString()); - setLogDebug(false); - setLogFile(QString()); _temporaryFolderLogDir = false; }