-
Notifications
You must be signed in to change notification settings - Fork 62
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
prevents program from exiting #24
Comments
A super hacky workaround for this would be reaching into the setTimeout(( -> log.transports.graylog2.graylog2.client.unref()), 100) But it needs to be run after the client has been created, which we can't determine reliably. Maybe this should be an issue with the graylog2 package |
hi @slang800 :) cheers |
@slang800 thumbs up if you want to give this a crack..we've been banging our head against it as well :) |
BTW we could do the same thing that's done in https://github.com/kenperkins/winston-papertrail#closing-the-transport |
A potentially interesting note is how this affects AWS Lambda functions, since they'll just time out instead of terminating -- and since you're charged for how long your Lambda function runs, it could cost you a bit more than you expect. |
Close Graylog2 connection on close. Fixes #24
Since this never calls
close
on the graylog2 UDP stream, this transport prevents the program from exiting when it's finished.Here's some code I'm using to test:
The text was updated successfully, but these errors were encountered: