Add error logger to http server (#2242)

* add error logger to http server

Signed-off-by: MonzElmasry <menna.elmasry@rancher.com>
This commit is contained in:
Menna Elmasry 2020-09-14 23:14:30 +02:00 committed by GitHub
parent beab211685
commit edb3e5b7a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@ package cluster
import (
"context"
"crypto/tls"
"log"
"net"
"net/http"
"path/filepath"
@ -60,7 +61,8 @@ func (c *Cluster) initClusterAndHTTPS(ctx context.Context) error {
}
server := http.Server{
Handler: handler,
Handler: handler,
ErrorLog: log.New(logrus.StandardLogger().Writer(), "Cluster-Http-Server ", log.LstdFlags),
}
go func() {