Skip to content

confighttp.ToServer should be setting ErrorLog #11820

@yurishkuro

Description

@yurishkuro

Is your feature request related to a problem? Please describe.

Standard http.Server has a field ErrorLog:

	// ErrorLog specifies an optional logger for errors accepting
	// connections, unexpected behavior from handlers, and
	// underlying FileSystem errors.
	// If nil, logging is done via the log package's standard logger.
	ErrorLog *log.Logger

However, confighttp.ToServer leaves it empty, which will lead to error logs printed using a different logger.

Describe the solution you'd like
In Jaeger we initialize it with a logger backed by Zap:

	errorLog, _ := zap.NewStdLogAt(params.Logger, zapcore.ErrorLevel)
	server.ErrorLog = errorLog

I think confighttp.ToServer() should do the same.

Metadata

Metadata

Labels

good first issueGood for newcomershelp wantedGood issue for contributors to OpenTelemetry Service to pick up

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions