mirror of
https://github.com/christianselig/apollo-backend
synced 2024-12-22 22:35:27 +00:00
Add a few more fields to http logging
This commit is contained in:
parent
9df9999a0a
commit
bcb53235f8
1 changed files with 2 additions and 0 deletions
|
@ -122,6 +122,8 @@ func (a *api) loggingMiddleware(next http.Handler) http.Handler {
|
|||
|
||||
logEntry := a.logger.WithFields(logrus.Fields{
|
||||
"duration": time.Now().Sub(start).Milliseconds(),
|
||||
"method": r.Method,
|
||||
"remote#addr": r.RemoteAddr,
|
||||
"response#bytes": lrw.bytes,
|
||||
"status": lrw.statusCode,
|
||||
"uri": r.RequestURI,
|
||||
|
|
Loading…
Reference in a new issue