Unverified Commit edb3e5b7 authored by Menna Elmasry's avatar Menna Elmasry Committed by GitHub

Add error logger to http server (#2242)

* add error logger to http server Signed-off-by: 's avatarMonzElmasry <menna.elmasry@rancher.com>
parent beab2116
...@@ -3,6 +3,7 @@ package cluster ...@@ -3,6 +3,7 @@ package cluster
import ( import (
"context" "context"
"crypto/tls" "crypto/tls"
"log"
"net" "net"
"net/http" "net/http"
"path/filepath" "path/filepath"
...@@ -60,7 +61,8 @@ func (c *Cluster) initClusterAndHTTPS(ctx context.Context) error { ...@@ -60,7 +61,8 @@ func (c *Cluster) initClusterAndHTTPS(ctx context.Context) error {
} }
server := http.Server{ server := http.Server{
Handler: handler, Handler: handler,
ErrorLog: log.New(logrus.StandardLogger().Writer(), "Cluster-Http-Server ", log.LstdFlags),
} }
go func() { go func() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment