If there's a networking problem accessing LogEntries, the error will be logged to console.error(), but the log entry itself will discarded.
Other solutions I've seen involve pushing log entries on an in-memory queue, and flushing the queue when the connection is up again. It's important to have some upper-limit on the queue size in that design so memory doesn't end up exhausted from queue size growth.
If you wanted to depend on a LogEntries client instead of connecting directly, that project is working on exactly that kind of solution.
@markstos thanks for checking out the project!
I used this in a project where losing logs was okay .. however, a service like fluentd would be the way to go. Here's a plugin Woorank/fluent-plugin-logentries or with docker logs kiyoto/docker-fluentd/.