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/
This commit is contained in:
deepsource-autofix[bot] 2022-05-17 09:51:45 +00:00 committed by GitHub
parent 1bf45ba20d
commit 017349c59a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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}`
)
),
}),
],
});
},
};