Skip to content

Commit

Permalink
Added Zap as the default Error log #11820
Browse files Browse the repository at this point in the history
  • Loading branch information
tarun-kavipurapu committed Dec 11, 2024
1 parent f9c3375 commit 71c16e0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion config/confighttp/confighttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,10 @@ func (hss *ServerConfig) ToServer(_ context.Context, host component.Host, settin
next: handler,
includeMetadata: hss.IncludeMetadata,
}
errorLog, _ := zap.NewStdLogAt(settings.Logger, zapcore.ErrorLevel)
errorLog, err := zap.NewStdLogAt(settings.Logger, zapcore.ErrorLevel)
if err != nil {
return nil, err

Check warning on line 486 in config/confighttp/confighttp.go

View check run for this annotation

Codecov / codecov/patch

config/confighttp/confighttp.go#L485-L486

Added lines #L485 - L486 were not covered by tests
}
server := &http.Server{
Handler: handler,
ReadTimeout: hss.ReadTimeout,
Expand Down

0 comments on commit 71c16e0

Please sign in to comment.