Skip to content

Commit

Permalink
change id field to request_id
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Aug 12, 2020
1 parent 0b5ee77 commit c46d5b6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions http/logs/logs.go
Expand Up @@ -63,11 +63,11 @@ func New(c *up.Config, next http.Handler) (http.Handler, error) {
// logContext returns the common log context for a request.
func logContext(r *http.Request) log.Interface {
return ctx.WithFields(log.Fields{
"id": r.Header.Get("X-Request-Id"),
"method": r.Method,
"path": r.URL.Path,
"query": r.URL.Query().Encode(),
"ip": r.RemoteAddr,
"request_id": r.Header.Get("X-Request-Id"),
"method": r.Method,
"path": r.URL.Path,
"query": r.URL.Query().Encode(),
"ip": r.RemoteAddr,
})
}

Expand Down

0 comments on commit c46d5b6

Please sign in to comment.