mirror of
https://github.com/screego/server.git
synced 2026-08-30 17:33:30 +08:00
Add remote addr to http log
This commit is contained in:
@@ -58,6 +58,7 @@ func accessLogger(r *http.Request, status, size int, dur time.Duration) {
|
||||
Str("host", r.Host).
|
||||
Int("status", status).
|
||||
Int("size", size).
|
||||
Str("ip", r.RemoteAddr).
|
||||
Str("path", r.URL.Path).
|
||||
Str("duration", dur.String()).
|
||||
Msg("HTTP")
|
||||
|
||||
Reference in New Issue
Block a user