From 63ec69b72d260925caad20eeb924d893067f521e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 7 Feb 2023 23:47:38 +0100 Subject: [PATCH] refactor(simulator): use proper type for log format MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/utils/Logger.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/Logger.ts b/src/utils/Logger.ts index 4b884638..53a4bf5f 100644 --- a/src/utils/Logger.ts +++ b/src/utils/Logger.ts @@ -1,4 +1,4 @@ -import type { Format } from 'logform'; +import type { FormatWrap } from 'logform'; import { type Logger, createLogger, format, type transport } from 'winston'; import TransportType from 'winston/lib/winston/transports'; import DailyRotateFile from 'winston-daily-rotate-file'; @@ -40,7 +40,7 @@ if (Configuration.getLogRotate() === true) { const logger: Logger = createLogger({ level: Configuration.getLogLevel(), - format: format.combine(format.splat(), (format[Configuration.getLogFormat()] as () => Format)()), + format: format.combine(format.splat(), (format[Configuration.getLogFormat()] as FormatWrap)()), transports, }); @@ -53,7 +53,7 @@ if (Configuration.getLogConsole()) { new TransportType.Console({ format: format.combine( format.splat(), - (format[Configuration.getLogFormat()] as () => Format)() + (format[Configuration.getLogFormat()] as FormatWrap)() ), }) ); -- 2.34.1