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

Behavior Changed to fix tests: Intentional? #113

Open
james-criscuolo opened this issue May 1, 2019 · 0 comments
Open

Behavior Changed to fix tests: Intentional? #113

james-criscuolo opened this issue May 1, 2019 · 0 comments

Comments

@james-criscuolo
Copy link

Commit db24410 changed the behavior of of sendDgram's error handling (seen here: https://github.com/winstonjs/winston-syslog/blob/master/lib/winston-syslog.js#L174).

The code used to call onError with no argument, which would not emit "error" on the transport itself. Now that an argument is passed, "error" is emitted on the transport. Once this occurs, my logs in syslog immediately stop. Commenting out the offending line (https://github.com/winstonjs/winston-syslog/blob/master/lib/winston-syslog.js#L150) "fixes" it, but I doubt that is the correct approach.

Is there some way to correctly deal with this error and have my log continue working? I can catch the error, but I don't see anything documented in winston for clearing it or really doing anything besides catching it. I also have exitOnError set to false on my main logger.

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