diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2019-11-11 14:02:01 -0700 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2019-11-11 14:02:01 -0700 |
commit | a19da07b72d84432341990bcedce511fe2f980da (patch) | |
tree | 75a81c8b765f14315b5c53a94e2060b1d2474339 | |
parent | 16782d9988986a44e96337878e127363f29cccf6 (diff) |
http: Add response headers to access logs
-rw-r--r-- | modules/caddyhttp/server.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/caddyhttp/server.go b/modules/caddyhttp/server.go index 57d1a3b..e119c2d 100644 --- a/modules/caddyhttp/server.go +++ b/modules/caddyhttp/server.go @@ -121,6 +121,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { zap.Duration("latency", latency), zap.Int("size", wrec.Size()), zap.Int("status", wrec.Status()), + zap.Object("resp_headers", LoggableHTTPHeader(wrec.Header())), ) }() } |