From 38ba3daf01de5f9ef401187c47fbd51905c5d27d Mon Sep 17 00:00:00 2001 From: Vincenzo Chianese Date: Mon, 3 Sep 2018 11:01:27 +0200 Subject: [PATCH] Restore timestamp output for EG --- lib/logger.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/logger.js b/lib/logger.js index 083ace441..71b80bebd 100644 --- a/lib/logger.js +++ b/lib/logger.js @@ -1,13 +1,12 @@ const { createLogger, format, transports } = require('winston'); -const { combine, colorize, label, printf, splat } = format; -// TODO: rm LOG_LEVEL and LOG_LEVEL_xxx env vars and configure it system config; -// system config will provide env vars support +const { combine, colorize, label, printf, splat, timestamp } = format; const logFormat = (loggerLabel) => combine( + timestamp(), splat(), colorize(), label({ label: loggerLabel }), - printf(info => `${info.label} ${info.level}: ${info.message}`) + printf(info => `${info.timestamp} ${info.label} ${info.level}: ${info.message}`) ); const createLoggerWithLabel = (label) => createLogger({