From 8984736ca72dac1e923efdec416b9c2a689e4560 Mon Sep 17 00:00:00 2001 From: les Date: Sat, 19 Jun 2021 22:53:01 +0200 Subject: [PATCH] add console loggin in production --- server/log.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/server/log.js b/server/log.js index 3a490656..5ff0f4f6 100644 --- a/server/log.js +++ b/server/log.js @@ -27,9 +27,17 @@ const logger = createLogger({ createSymlink: true, zippedArchive: true, maxSize: '10m', - maxFiles: '14d', + maxFiles: '10d', format: format.combine(format.timestamp(), format.splat(), gancioFormat) - })] + }), + new transports.Console( + { + handleExceptions: true, + handleRejections: true, + level: config.log_level || 'info', + format: format.combine(format.timestamp(), format.splat(), format.colorize(), gancioFormat) + } + )] }) module.exports = logger