scrive / log

Structured logging solution.
https://hackage.haskell.org/package/log-base
BSD 3-Clause "New" or "Revised" License
35 stars 7 forks source link

withElasticSearchLogger continues past `(Logger -> IO r)` action when EL is unreachable #49

Open jonathanjouty opened 5 years ago

jonathanjouty commented 5 years ago

As per title, if your Elasticsearch cluster is unreachable or cannot accept messages for whatever reason, withElasticSearchLogger will keep going even though the (Logger -> IO r) action completed.

This is not completely counter to the documentation, which states that:

Create an elasticSearchLogger for the duration of the given action, and shut it down afterwards, making sure that all buffered messages are actually written to the Elasticsearch store.

The question is more about how this should work—I would prefer if it actually gave up after some time... since Elasticsearch can easily be unavailable.

Maybe an extra timeout parameter?

cc/ @arybczak @23Skidoo @phadej

jonathanjouty commented 5 years ago

Ping @arybczak @phadej @23Skidoo Any preferred solution before we start working on this?