logdna / nodejs

Node.js library for logging to LogDNA
MIT License
74 stars 66 forks source link

HTTP Exception Handling #62

Closed vilyapilya closed 5 years ago

vilyapilya commented 5 years ago

If logger receives an unsuccessful response, it will bring the message back to the buffer and will schedule the next incoming message to be sent in back_off period instead of sending it in the regular period.

Once the the back off period passes, the message will be sent and the backoff flag switched off. It also makes sure that the backoff flag switched back to off when a successful res is received.

This PR also makes changes in the test as the tests run in parallel, and using the same servers and global result placeholders can produce unreliable results