From 0eb0b60f47bddcf24f6af9265e60044033555ff2 Mon Sep 17 00:00:00 2001 From: Matt Holt Date: Sun, 28 Nov 2021 23:08:52 -0700 Subject: logging: Remove common_log field and single_field encoder (#4149) (#4282) --- modules/caddyhttp/server.go | 9 --------- 1 file changed, 9 deletions(-) (limited to 'modules/caddyhttp/server.go') diff --git a/modules/caddyhttp/server.go b/modules/caddyhttp/server.go index 26384af..2ddec60 100644 --- a/modules/caddyhttp/server.go +++ b/modules/caddyhttp/server.go @@ -187,7 +187,6 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { 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()), @@ -627,14 +626,6 @@ func cloneURL(from, to *url.URL) { } } -const ( - // commonLogFormat is the common log format. https://en.wikipedia.org/wiki/Common_Log_Format - commonLogFormat = `{http.request.remote.host} ` + commonLogEmptyValue + ` {http.auth.user.id} [{time.now.common_log}] "{http.request.orig_method} {http.request.orig_uri} {http.request.proto}" {http.response.status} {http.response.size}` - - // commonLogEmptyValue is the common empty log value. - commonLogEmptyValue = "-" -) - // Context keys for HTTP request context values. const ( // For referencing the server instance -- cgit v1.2.3