From d91c6da43efa25839142cc13c7ca48f72543e419 Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Sun, 18 Dec 2022 16:24:55 +0100 Subject: [PATCH] Suppress more HTTP log messages --- srv.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/srv.go b/srv.go index 62afa87..97fdbb6 100644 --- a/srv.go +++ b/srv.go @@ -33,6 +33,15 @@ var cli struct { const logLineStart = "LOG_LINE_START " +func suppressMessages() []string { + return []string{ + "error reading preface from client", + "TLS handshake error from", + "URL query contains semicolon, which is no longer a supported separator", + "connection error: PROTOCOL_ERROR", + } +} + func copyHeader(dst, src http.Header) { for k, vv := range src { for _, v := range vv { @@ -95,10 +104,7 @@ func serve(conf *config.Config) error { errorsLog = logging.NewLogSuppressor( conf.Logging.ErrorsLog, - []string{ - "error reading preface from client", - "TLS handshake error from", - }, + suppressMessages(), logLineStart, )