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

Writing to `console` should be optional or not happen at all #37

Closed
DJphilomath opened this issue Apr 6, 2018 · 4 comments
Closed

Writing to `console` should be optional or not happen at all #37

DJphilomath opened this issue Apr 6, 2018 · 4 comments

Comments

@DJphilomath
Copy link

@DJphilomath DJphilomath commented Apr 6, 2018

Retry logic printouts should be done with a logging library or be optional. Those printouts pollute the general log and are impossible to move somewhere else.

log #218 - failed on error: Error: read ECONNRESET
log #218 - Trying again in 2000[ms], attempt no. 2
log #220 - failed on error: 500 Internal Server Error
log #220 - Trying again in 2000[ms], attempt no. 2
log #218 sent successfully after 2 retries
log #220 sent successfully after 2 retries
@Shwetajain148
Copy link

@Shwetajain148 Shwetajain148 commented Jun 28, 2018

Hi @DJphilomath, Good news here! I have released a new beta version of our winston-loggly-bulk library which handles your above request and works with winston V 2.4.x. If you are using winston 2.x then you can setup the library using the below command-

npm install winston-loggly-bulk@beta

If you are on winston V 3.x then please run below command to fetch 3.x compatible environment.

npm install https://github.com/loggly/winston-loggly-bulk.git#3.x --save

The winston-loggly-bulk's 3.x version is currently a RC package and I'm expecting feedback from our customers so that I can resolve all issues(if any) and then make a stable 3.x release.

Changes: I have disabled the network error console writing by default and created a flag variable which can be set to true (in your main app.js file) to enable error writing on console like below-

networkErrorsOnConsole: true

If you are interested in winston 3.x instruction then follow the link here.

Thanks.

@DJphilomath
Copy link
Author

@DJphilomath DJphilomath commented Jun 28, 2018

Perfect. I'll include in the next sprint and let you know how it goes.

@Shwetajain148
Copy link

@Shwetajain148 Shwetajain148 commented Jun 29, 2018

Sure @DJphilomath, thanks for your inputs.

@Shwetajain148
Copy link

@Shwetajain148 Shwetajain148 commented Aug 1, 2018

Hi @DJphilomath, Since I have already done with this issue and it seems to be resolved, I am going ahead and closing this one. Please feel free to put your comment/issue if any.

Thanks!

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.