let logger = winston.createLogger({
format: {
transform(info, opts) {
info.message = "!" + info.message + "!";
return info;
}
},
transports: [
new winston.transports.Console()
]
});
logger.info("Something");
This code outputs "undefined" in my console. Why? If I use the default formats, it works perfectly. But if I use my own or even custom formats from official winston examples, it does not work.