When winston handles caught exceptions, it prints good information about an uncaught exception. How can I do the same for โcaught exceptionsโ?
if (err) {
I checked the source and seems to be the logException method, but I don't know how to use it.
var logger = new winston.Logger({ transports: [new winston.transports.Console({handleExceptions: true})] }) var err = new Error('test error.') logger.logException(err.message)
Michelle
source share