Skip to content

Commit

Permalink
Added Zap as the default Error log open-telemetry#11820
Browse files Browse the repository at this point in the history
  • Loading branch information
tarun-kavipurapu committed Dec 11, 2024
1 parent 71c16e0 commit e2b7c86
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions config/confighttp/confighttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 {
Expand Down

0 comments on commit e2b7c86

Please sign in to comment.