log
log copied to clipboard
Allow specifying a retry policy on elasticsearch communication
Closes https://github.com/scrive/log/issues/49
One issue with the current setup is that any action to elastic is always retried endlessly. This is problematic with logging, which (IMO) shouldn't be the reason an application hangs.
The hanging occurs because the cleanup (called on exit of the scope of withLogger in the calling thread) of a bulk logger attempts to flush it's buffer to the log-medium, in this case elastic which may be unavailable, doing a step & sync. This fixes it by allowing to specify a retry policy a la retry, that's used when attempting the action.