-
Notifications
You must be signed in to change notification settings - Fork 18k
net/http: logging support #3344
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
Comments
Brad, any thoughts on a minimal tweak to allow logging in net/http? Labels changed: added go1.2maybe. Owner changed to @bradfitz. |
Is this issue still in the plans? We can hook a Logger to an http.Client and an http.Server. |
Update: Camlistore's logging code is now here: https://github.com/camlistore/camlistore/blob/master/website/logging.go This bug is about an interface for the HTTP server to report back stats about a handler's activity after it's done, to let another layer serialize it or sent it off to logging somewhere. This can be done with Handler wrappers (as in Camlistore's code, and done by many others), but the HTTP server knows much more and more efficiently, so it could just be built-in. There are still no plans, but somebody could work on it. I'd be happy to review. It would need to work with both HTTP/1 and HTTP/2. A good place to put the stats records is the new https://tip.golang.org/pkg/net/http/httptrace/ package, to not pollute the main http package godoc. |
This is now a dup of #18997. See the following comment: |
The text was updated successfully, but these errors were encountered: