Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'handleExceptions: true' log twice #18

Open
RafeSafari opened this issue Mar 19, 2019 · 1 comment
Open

'handleExceptions: true' log twice #18

RafeSafari opened this issue Mar 19, 2019 · 1 comment

Comments

@RafeSafari
Copy link

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
Copy link
Author

RafeSafari commented Mar 28, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant