i am not getting any log on node terminal colorize and prettyPrint also not working.
var winston = require(“winston”);
const { combine, timestamp, label, prettyPrint, colorize } = winston.format;
require(“winston-mongodb”);
require(“express-async-errors”);
module.exports = function () {
** winston.exceptions.handle(**
** new winston.transports.Console({**
** format: combine(prettyPrint(), colorize()),**
** }),**
** new winston.transports.File({**
** filename: “uncaughtExceptions.log”,**
** format: winston.format.json({ space: 1 }),**
** })**
** );**
** process.on(“unhandledRejection”, (ex) => {**
** throw ex;**
** });**
** // This is the File Transport creats a log file in vscode**
** winston.add(**
** new winston.transports.File({**
** filename: “logfile.log”,**
** format: winston.format.json({ space: 1 }),**
** })**
** );**
** //Mongodb transport**
** winston.add(**
** new winston.transports.MongoDB({**
** options: { useUnifiedTopology: true },**
** db: “mongodb://localhost/vidly”,**
** level: “info”,**
** collection: “log-errors”,**
** })**
** );**
};