Skip to content

Commit

Permalink
Do not alter the user's debug and expiration settings when changing t…
Browse files Browse the repository at this point in the history
…emporary log dir setting

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
  • Loading branch information
claucambra committed Oct 31, 2024
1 parent a5b6df9 commit 232fa02
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/libsync/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -249,8 +248,6 @@ void Logger::disableTemporaryFolderLogDir()

enterNextLogFile("nextcloud.log", LogType::Log);
setLogDir(QString());
setLogDebug(false);
setLogFile(QString());
_temporaryFolderLogDir = false;
}

Expand Down

0 comments on commit 232fa02

Please sign in to comment.