Closed marcinbudny closed 2 years ago
@marcinbudny Do you have a library that you like on this? I'm not a Gopher so I'm looking for examples.
I'm currently using logrus, however I don't think adding a specific logger to ESDB client is the way to go. ESDB client is a library and it should enable its users to choose what they want to use.
If there was an abstraction layer for logging, I could implement a simple adapter for logrus. This abstraction layer could be something similar to the one proposed in this repo. This is just an example, instead of adding it as a dependency, ESDB client could define its own logging interface.
The default implementation could write to console, but then I could replace it with my implementation that writes to logrus.
BTW I'm not a Gopher myself, so maybe there is a more idiomatic way to do this 😉
@marcinbudny if possible, I'd like to have your input on https://github.com/EventStore/EventStore-Client-Go/pull/119
The PR brings a pluggable logging implementation based on a function type.
Currently there is no way to control logging from the ESDB client. E.g. these messages are written to console in my application:
It would be great to make the logging pluggable, so that the user of the library can decide where the logs are written and select the logging level.