diff options
author | Alan Pearce | 2024-05-25 18:10:06 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-25 18:10:06 +0200 |
commit | b65fdaad764314991f502f3702b904a11f0fe6e7 (patch) | |
tree | 8db83c1cd7c2e5689433698e99bf897e6b25afc3 /internal | |
parent | fb07320a12f83ffaf80bf3c0aca94a720f865201 (diff) | |
download | searchix-b65fdaad764314991f502f3702b904a11f0fe6e7.tar.lz searchix-b65fdaad764314991f502f3702b904a11f0fe6e7.tar.zst searchix-b65fdaad764314991f502f3702b904a11f0fe6e7.zip |
refactor: don't log request Host, it's irrelevant to this server
Diffstat (limited to 'internal')
-rw-r--r-- | internal/server/logging.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/internal/server/logging.go b/internal/server/logging.go index bbe9469..372972f 100644 --- a/internal/server/logging.go +++ b/internal/server/logging.go @@ -51,20 +51,15 @@ func wrapHandlerWithLogging(wrappedHandler http.Handler, opts wrappedHandlerOpti if scheme == "" { scheme = "http" } - host := r.Host - if host == "" { - host = opts.defaultHostname - } lw := NewLoggingResponseWriter(w) wrappedHandler.ServeHTTP(lw, r) statusCode := lw.statusCode fmt.Fprintf( opts.logger, - "%s %s %d %s %s %s\n", + "%s %s %d %s %s\n", scheme, r.Method, statusCode, - host, r.URL.Path, lw.Header().Get("Location"), ) |