improve logging
This commit is contained in:
parent
afcd407f1d
commit
14de89989a
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@ import (
|
||||||
|
|
||||||
func Logger(handler http.Handler) http.HandlerFunc {
|
func Logger(handler http.Handler) http.HandlerFunc {
|
||||||
return func(res http.ResponseWriter, req *http.Request) {
|
return func(res http.ResponseWriter, req *http.Request) {
|
||||||
log.Printf("%-30s %-80s", req.RemoteAddr, req.URL.Path)
|
log.Printf("%-30s %s", req.RemoteAddr, req.URL.Path)
|
||||||
handler.ServeHTTP(res, req)
|
handler.ServeHTTP(res, req)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue