From 28cd6903efa4feeef59d8155ea64208f7b76ed68 Mon Sep 17 00:00:00 2001 From: r2go Date: Sun, 7 Jan 2024 07:39:46 +0000 Subject: [PATCH] Issue #246 Reduce server log retention time (!186) https://dev.sp-tarkov.com/SPT-AKI/Issues/issues/246 Reduces log rotation frequency to 3h. Co-authored-by: r2go Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/186 Co-authored-by: r2go Co-committed-by: r2go --- project/src/utils/logging/AbstractWinstonLogger.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/project/src/utils/logging/AbstractWinstonLogger.ts b/project/src/utils/logging/AbstractWinstonLogger.ts index 24dabbdf..f6cab383 100644 --- a/project/src/utils/logging/AbstractWinstonLogger.ts +++ b/project/src/utils/logging/AbstractWinstonLogger.ts @@ -69,6 +69,7 @@ export abstract class AbstractWinstonLogger implements ILogger filename: this.filePath, datePattern: "YYYY-MM-DD", zippedArchive: true, + frequency: this.getLogFrequency(), maxSize: this.getLogMaxSize(), maxFiles: this.getLogMaxFiles(), format: format.combine( @@ -107,6 +108,11 @@ export abstract class AbstractWinstonLogger implements ILogger protected abstract getFileName(): string; + protected getLogFrequency(): string + { + return "3h"; + } + protected getLogMaxSize(): string { return "5m";