feat(logs): provide an option to keep all logs

This commit is contained in:
Romain DEP.
2025-08-13 23:35:31 +02:00
parent 384a89b0e3
commit 3ba487bb00
2 changed files with 10 additions and 1 deletions

View File

@@ -38,6 +38,9 @@ async function cleanupOldLogFiles() {
const customRetentionDays = config.Logging.retentionDays;
if (customRetentionDays > 0) {
retentionDays = customRetentionDays;
} else if (customRetentionDays <= -1){
info(`Log cleanup: keeping all log files, as specified by configuration.`);
return
}
const cutoffDate = new Date();