From 017349c59aaceb6c970af2edfda05bd426e6ac53 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 17 May 2022 09:51:45 +0000 Subject: [PATCH] Format code with standardjs and prettier This commit fixes the style issues introduced in 1bf45ba according to the output from standardjs and prettier. Details: https://deepsource.io/gh/ZynerOrg/xyter/transform/0e77e7e1-b401-4c59-8430-b16034d661e0/ --- src/logger/index.ts | 49 ++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/src/logger/index.ts b/src/logger/index.ts index 8d95224..c82f2ae 100644 --- a/src/logger/index.ts +++ b/src/logger/index.ts @@ -4,27 +4,30 @@ import "winston-daily-rotate-file"; const { combine, timestamp, printf, colorize, align, json } = winston.format; module.exports = { - // Logger initialized async-hronously - logger: async () => { -return winston.createLogger({ - level: process.env.LOG_LEVEL || "silly", - transports: [ - new winston.transports.DailyRotateFile({ - filename: "logs/combined-%DATE%.log", - datePattern: "YYYY-MM-DD", - maxFiles: "14d", - format: combine(timestamp(), json()), - }), - new winston.transports.Console({ - format: combine( - colorize({ all: true }), - timestamp({ - format: "YYYY-MM-DD HH:MM:ss", + // Logger initialized async-hronously + logger: async () => { + return winston.createLogger({ + level: process.env.LOG_LEVEL || "silly", + transports: [ + new winston.transports.DailyRotateFile({ + filename: "logs/combined-%DATE%.log", + datePattern: "YYYY-MM-DD", + maxFiles: "14d", + format: combine(timestamp(), json()), }), - align(), - printf((info) => `[${info.timestamp}] ${info.level}: ${info.message}`) - ), - }), - ], -}); - }} + new winston.transports.Console({ + format: combine( + colorize({ all: true }), + timestamp({ + format: "YYYY-MM-DD HH:MM:ss", + }), + align(), + printf( + (info) => `[${info.timestamp}] ${info.level}: ${info.message}` + ) + ), + }), + ], + }); + }, +};