From 576e844e2c99d2abce30ed0c2751b9e8c5d28515 Mon Sep 17 00:00:00 2001 From: Dimitriys Date: Tue, 19 Nov 2024 13:35:22 +0300 Subject: [PATCH] Add timestamp to log --- src/logger.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/logger.ts b/src/logger.ts index d30d28d1..f3850401 100644 --- a/src/logger.ts +++ b/src/logger.ts @@ -1,6 +1,10 @@ import * as winston from "winston" export const logger = winston.createLogger({ + format: winston.format.combine( + winston.format.timestamp({ format: "YYYY-MM-DD hh:mm:ss A" }), + winston.format.json() + ), levels: winston.config.syslog.levels, transports: [ new winston.transports.Console() ], })