Log host name for each request
This commit is contained in:
parent
b969e40fb4
commit
5e11c443eb
@ -19,7 +19,7 @@ func viewPage(w http.ResponseWriter, r *http.Request) {
|
||||
http.Error(w, "Error", http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
log.Info(fmt.Sprintf("\"%s %s\" %s \"%s\"", r.Method, r.RequestURI, time.Since(start), r.UserAgent()))
|
||||
log.Info(fmt.Sprintf("\"%s %s\" %s \"%s\" \"%s\"", r.Method, r.RequestURI, time.Since(start), r.UserAgent(), r.Host))
|
||||
}()
|
||||
|
||||
name := r.URL.Path[1:]
|
||||
|
Loading…
Reference in New Issue
Block a user