winston-azure-application-insights icon indicating copy to clipboard operation
winston-azure-application-insights copied to clipboard

'handleExceptions: true' log twice

Open RafeSafari opened this issue 5 years ago • 1 comments

There is only one transport, added like this:

winston.add(winston.createLogger({
    transports: [
        new winston.transports.Console({
            handleExceptions: true,
            format: winston.format.combine(
                winston.format.simple()
            ),
        }),
    ]
}));

When a new Error thrown from index.js: throw new Error('++++ I will log twice ++++') will result in two separate logs!

I've also tried transport.File({ ... }), but the same result.

RafeSafari avatar Mar 19 '19 08:03 RafeSafari

Updated stackoverflow question is here: https://stackoverflow.com/questions/55236098

RafeSafari avatar Mar 28 '19 07:03 RafeSafari