Skip to content

Commit 6948da0

Browse files
authored
chore(log): suppress the tls warning logs in the console (#2193)
chore(log): supress the tls warning logs in the console
1 parent c64fd9b commit 6948da0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/installer/cli/install.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"encoding/json"
77
"errors"
88
"fmt"
9+
"log"
910
"net"
1011
"net/http"
1112
"os"
@@ -446,6 +447,8 @@ func runInstallAPI(ctx context.Context, listener net.Listener, cert tls.Certific
446447
router.PathPrefix("/").Methods("GET").Handler(webFs)
447448

448449
server := &http.Server{
450+
// ErrorLog outputs TLS errors and warnings to the console, we want to make sure we use the same logrus logger for them
451+
ErrorLog: log.New(logger.WithField("http-server", "std-log").Writer(), "", 0),
449452
Handler: router,
450453
TLSConfig: tlsutils.GetTLSConfig(cert),
451454
}

0 commit comments

Comments
 (0)