-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change parameter type of http.Logger() to interface #144
Comments
We did something similar for the HTTP client, could you at least explain more the use case and why it can't be solved with the current logger (maybe convenience or actual technical challenge). |
closing as related to / subset of #37 |
@jcchavezs We use in our applications a different logger then the one from the stdlib. I want to use our logger because it e.g. prints messages in JSON-format to stdout. |
The http.Logger() interface expects a
log.Logger
type as parameter.Instead of expecting
log.Logger
, define a simple logger interface with thePrintf()
method and change the parameter to that interface.That will allow to use other loggers then
log.Logger
of the stdlib as reporter logger.The text was updated successfully, but these errors were encountered: