From f819d661e86957b15d4f1741deb62c78f4fe4ede Mon Sep 17 00:00:00 2001 From: sir-wilhelm Date: Mon, 16 Feb 2026 14:49:58 -0600 Subject: [PATCH] If scanLogsToKeep is <= 0 don't purge. For now this would be a manual database update to configure this. It does help future proof the setting being set in the UI. --- server/managers/LogManager.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/managers/LogManager.js b/server/managers/LogManager.js index 5583c5dfd..9bacfeeba 100644 --- a/server/managers/LogManager.js +++ b/server/managers/LogManager.js @@ -41,6 +41,8 @@ class LogManager { } async enforceDailyLogRetention() { + if (this.loggerDailyLogsToKeep <= 0) return + while (this.dailyLogFiles.length > this.loggerDailyLogsToKeep) { await this.removeLogFile(this.dailyLogFiles[0]) } @@ -197,6 +199,7 @@ class LogManager { */ async purgeOldScanLogs(logDir = this.ScanLogPath) { const scanLogsToKeep = this.loggerScannerLogsToKeep + if (scanLogsToKeep <= 0) return let scanFiles try {