summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/server.go
diff options
context:
space:
mode:
authorMatt Holt <mholt@users.noreply.github.com>2021-11-28 23:08:52 -0700
committerGitHub <noreply@github.com>2021-11-29 01:08:52 -0500
commit0eb0b60f47bddcf24f6af9265e60044033555ff2 (patch)
treebe0baddcdcc423069f5d8f5b228af46c15984592 /modules/caddyhttp/server.go
parent5e5af50e64a33ecd9c91aaa773d4f8428945ac74 (diff)
logging: Remove common_log field and single_field encoder (#4149) (#4282)
Diffstat (limited to 'modules/caddyhttp/server.go')
-rw-r--r--modules/caddyhttp/server.go9
1 files changed, 0 insertions, 9 deletions
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