Skip to content

Commit

Permalink
Add remote addr to http log
Browse files Browse the repository at this point in the history
  • Loading branch information
jmattheis committed Oct 27, 2020
1 parent 3191988 commit ea7dbdb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit ea7dbdb

Please sign in to comment.