logdna / nodejs

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

Try to flush after failing without waiting for the next log. #93

Closed vilyapilya closed 4 years ago

vilyapilya commented 4 years ago

Previously: when the logger fails to send a log, it saved the message in the buffer and attempts to send it only after receiving the next log.

Now: when the logger fails to send a log, it tries to send it three times (after backoff period is passed) without waiting for the next log to come. If it fails to send it three (configurable) times, it saves it in the buffer and attempts again when the next message comes.