From e2b7c86f0deeaf21603d2525dad317f6576497aa Mon Sep 17 00:00:00 2001 From: Tarun Date: Wed, 11 Dec 2024 22:21:24 +0530 Subject: [PATCH] Added Zap as the default Error log open-telemetry#11820 --- config/confighttp/confighttp.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/config/confighttp/confighttp.go b/config/confighttp/confighttp.go index 687a1c1b95a..80df409a2d7 100644 --- a/config/confighttp/confighttp.go +++ b/config/confighttp/confighttp.go @@ -482,9 +482,7 @@ func (hss *ServerConfig) ToServer(_ context.Context, host component.Host, settin includeMetadata: hss.IncludeMetadata, } errorLog, err := zap.NewStdLogAt(settings.Logger, zapcore.ErrorLevel) - if err != nil { - return nil, err - } + server := &http.Server{ Handler: handler, ReadTimeout: hss.ReadTimeout, @@ -494,7 +492,7 @@ func (hss *ServerConfig) ToServer(_ context.Context, host component.Host, settin ErrorLog: errorLog, } - return server, nil + return server, err } func responseHeadersHandler(handler http.Handler, headers map[string]configopaque.String) http.Handler {