mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-22 03:37:43 +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{
|
logEntry := a.logger.WithFields(logrus.Fields{
|
||||||
"duration": time.Now().Sub(start).Milliseconds(),
|
"duration": time.Now().Sub(start).Milliseconds(),
|
||||||
|
"method": r.Method,
|
||||||
|
"remote#addr": r.RemoteAddr,
|
||||||
"response#bytes": lrw.bytes,
|
"response#bytes": lrw.bytes,
|
||||||
"status": lrw.statusCode,
|
"status": lrw.statusCode,
|
||||||
"uri": r.RequestURI,
|
"uri": r.RequestURI,
|
||||||
|
|
Loading…
Reference in a new issue