Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve logging and error handling, (#5)
* Improve logging and error handling This overhauls the logging and error responses from the *Conn. Namely, it changes the logging backend to `log/slog` which makes it easier to manage the library's logging centrally (however the old functionally to provide a custom logger is retained). It also captures the reason why a specific connection to a ZK server was closed in the error that is propagated to all callers. This can be checked with `errors.Is`. This also adds an exponential backoff feature to the client, which will make it back off when reconnecting to a ZK server. * Remove logger option, it messes with the logging * Change default behavior of DNSHostProvider * Split implementation of HostProvider, fix up tests
- Loading branch information