1
0
mirror of https://github.com/golang/go synced 2024-11-12 10:20:27 -07:00

show remote addr instead of host in log lines

R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=29961
CL=29961
This commit is contained in:
Robert Griesemer 2009-06-05 17:08:22 -07:00
parent 8604e18093
commit 42cf59a752

View File

@ -599,7 +599,7 @@ func servePkg(c *http.Conn, r *http.Request) {
func loggingHandler(h http.Handler) http.Handler {
return http.HandlerFunc(func(c *http.Conn, req *http.Request) {
log.Stderrf("%s\t%s", req.Host, req.Url.Path);
log.Stderrf("%s\t%s", c.RemoteAddr, req.Url);
h.ServeHTTP(c, req);
})
}