diff options
Diffstat (limited to 'modules/caddyhttp')
-rw-r--r-- | modules/caddyhttp/server.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/caddyhttp/server.go b/modules/caddyhttp/server.go index 9dc1028..8094832 100644 --- a/modules/caddyhttp/server.go +++ b/modules/caddyhttp/server.go @@ -184,8 +184,11 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { log = logger.Error } + userID, _ := repl.GetString("http.auth.user.id") + log("handled request", zap.String("common_log", repl.ReplaceAll(commonLogFormat, commonLogEmptyValue)), + zap.String("user_id", userID), zap.Duration("duration", duration), zap.Int("size", wrec.Size()), zap.Int("status", wrec.Status()), |