Browse Source

http: Add response headers to access logs

master
Matthew Holt 5 years ago
parent
commit
a19da07b72
No known key found for this signature in database GPG Key ID: 2A349DD577D586A5
  1. 1
      modules/caddyhttp/server.go

1
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())),
)
}()
}

Loading…
Cancel
Save