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

Handle invalid Transport and fix problem on async loop during error #163

Merged
merged 1 commit into from
Nov 3, 2020
Merged

Conversation

TomChv
Copy link
Contributor

@TomChv TomChv commented Nov 2, 2020

I used winston-elasticseach to send logs on my ELK. I had some problems with auth on ElasticSearch and that made my server run really slowly because winston couldn't send logs....
I made this pull request to fix those 2 problems:

  • Handle invalid transport: It will not emit an error event then, you can handle it as you want in your codebase.
  • Handle error on failed report: It will emit an error if one of the bulk reach the max attempt. I think there is an other way to handle that but I give you a begin of idea.

@TomChv
Copy link
Contributor Author

TomChv commented Nov 2, 2020

This PR can also fix #115 Issue, I'm waiting for your comment to clean the code.
I can also refacto the bulkWriter into a class if you want.

@vanthome vanthome merged commit 1fc1dfc into vanthome:master Nov 3, 2020
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

Successfully merging this pull request may close these issues.

2 participants