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
Use logrus.Logger in httputil.ReverseProxy.ErrorLog ? #588
Comments
Mathieu, Unfortunately, I'm afraid this doesn't seem to be possible today. |
The best way to allow this would be to fix the ReverseProxy type to get an interface instead of the specific struct so ? (So in the Go standard library) |
Basically, yes. |
Thanks for the info, I published in issue on the Go repository if you want to follow that :) |
It's a workaround but you could accomplish this with your own standard logger that writes to logrus. Something like:
Outputs
|
Hello,
I'm trying to use logrus as logger for httputil.ReverseProxy.
It's expecting a log.Logger type, I've been searching without success on how do to that.
Any hint ? Is there a way to get a log.Logger from logrus ?
You can see the type there : https://golang.org/pkg/net/http/httputil/#ReverseProxy
Thanks
The text was updated successfully, but these errors were encountered: