From d24a17bff66dc1a8f71ad584ef470e4d41db2a25 Mon Sep 17 00:00:00 2001 From: zhq745w Date: Tue, 19 Nov 2024 15:51:04 +0300 Subject: [PATCH] Add timestamp to log (#350) --- src/logger.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/logger.ts b/src/logger.ts index d30d28d1..b45f0899 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" }), + winston.format.json() + ), levels: winston.config.syslog.levels, transports: [ new winston.transports.Console() ], })