Skip to content

Commit

Permalink
Merge 5281889 into 8eec6f6
Browse files Browse the repository at this point in the history
  • Loading branch information
codesankalp committed Jun 2, 2021
2 parents 8eec6f6 + 5281889 commit b26349e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions server/utils/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ const colors = {
winston.addColors(colors);

const format = winston.format.combine(
winston.format.errors({stack: true}),
winston.format.timestamp({format: "YYYY-MM-DD HH:mm:ss:ms"}),
winston.format.colorize({all: true}),
winston.format.printf(
(info) => `${info.timestamp} ${info.level}: ${info.message}`,
),
winston.format.printf((info) => {
const log = `${info.timestamp} ${info.level}: ${info.message}`;
return info.stack ? `${log}\n${info.stack}` : log;
}),
);

const transports = [
Expand Down

0 comments on commit b26349e

Please sign in to comment.