From a19da07b72d84432341990bcedce511fe2f980da Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Mon, 11 Nov 2019 14:02:01 -0700 Subject: [PATCH] http: Add response headers to access logs --- modules/caddyhttp/server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/caddyhttp/server.go b/modules/caddyhttp/server.go index 57d1a3b4..e119c2d3 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())), ) }() }