From ea7dbdbd51bce311091610fe5a7319f9670e4959 Mon Sep 17 00:00:00 2001 From: Jannis Mattheis Date: Mon, 26 Oct 2020 11:58:09 +0100 Subject: [PATCH] Add remote addr to http log --- router/router.go | 1 + 1 file changed, 1 insertion(+) diff --git a/router/router.go b/router/router.go index 2037d654..8aa26d70 100644 --- a/router/router.go +++ b/router/router.go @@ -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")