core/logging: change log.Error function (#5251)

* core/logging: change log.Error function

* use request id
This commit is contained in:
Caleb Doxsey 2024-09-05 15:42:46 -06:00 committed by GitHub
parent 97bf5edc54
commit dad954ae16
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
66 changed files with 163 additions and 166 deletions

View file

@ -32,7 +32,7 @@ var sysProcAttr = &syscall.SysProcAttr{
func (srv *Server) runProcessCollector(ctx context.Context) {
pc := metrics.NewProcessCollector("envoy")
if err := view.Register(pc.Views()...); err != nil {
log.Error(ctx).Err(err).Msg("failed to register envoy process metric views")
log.Ctx(ctx).Error().Err(err).Msg("failed to register envoy process metric views")
}
defer view.Unregister(pc.Views()...)
@ -57,7 +57,7 @@ func (srv *Server) runProcessCollector(ctx context.Context) {
if pid > 0 {
err := pc.Measure(ctx, pid)
if err != nil {
log.Error(ctx).Err(err).Msg("failed to measure envoy process metrics")
log.Ctx(ctx).Error().Err(err).Msg("failed to measure envoy process metrics")
}
}
}
@ -69,7 +69,7 @@ func (srv *Server) prepareRunEnvoyCommand(ctx context.Context, sharedArgs []stri
log.Info(ctx).Msg("envoy: releasing envoy process for hot-reload")
err := srv.cmd.Process.Release()
if err != nil {
log.Error(ctx).Err(err).Str("service", "envoy").Msg("envoy: failed to release envoy process for hot-reload")
log.Ctx(ctx).Error().Err(err).Str("service", "envoy").Msg("envoy: failed to release envoy process for hot-reload")
}
}