bragma / winston-azure-application-insights

Azure Application Insights transport for Winston
MIT License
16 stars 26 forks source link

'handleExceptions: true' log twice #18

Open RafeSafari opened 5 years ago

RafeSafari commented 5 years ago

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 commented 5 years ago

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