From 7da365bd45816b3a547b3b3d70566b9687752a86 Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Wed, 2 May 2018 12:59:17 -0700 Subject: [PATCH] etcdmain: silence http server logs Signed-off-by: Gyuho Lee --- etcdmain/grpc_proxy.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/etcdmain/grpc_proxy.go b/etcdmain/grpc_proxy.go index 6a1ff1f6b..aad8a088e 100644 --- a/etcdmain/grpc_proxy.go +++ b/etcdmain/grpc_proxy.go @@ -17,6 +17,7 @@ package etcdmain import ( "context" "fmt" + "io/ioutil" "log" "math" "net" @@ -388,7 +389,10 @@ func mustHTTPListener(lg *zap.Logger, m cmux.CMux, tlsinfo *transport.TLSInfo, c } lg.Info("gRPC proxy enabled pprof", zap.String("path", debugutil.HTTPPrefixPProf)) } - srvhttp := &http.Server{Handler: httpmux} + srvhttp := &http.Server{ + Handler: httpmux, + ErrorLog: log.New(ioutil.Discard, "net/http", 0), + } if tlsinfo == nil { return srvhttp, m.Match(cmux.HTTP1())