chore: Bringing across edits from enterprise codebase

This commit is contained in:
Tom Moor
2022-04-16 19:46:01 -07:00
parent 0b5e48621a
commit b1aba32b62
7 changed files with 13 additions and 11 deletions

View File

@@ -1,4 +1,5 @@
import chalk from "chalk";
import { isEmpty } from "lodash";
import winston from "winston";
import env from "@server/env";
import Metrics from "@server/logging/metrics";
@@ -32,10 +33,10 @@ class Logger {
: winston.format.combine(
winston.format.colorize(),
winston.format.printf(
({ message, level, label }) =>
({ message, level, label, ...extra }) =>
`${level}: ${
label ? chalk.bold("[" + label + "] ") : ""
}${message}`
}${message} ${isEmpty(extra) ? "" : JSON.stringify(extra)}`
)
),
})