mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-04 11:52:53 +02:00
core/logging: change log.Error function (#5251)
* core/logging: change log.Error function * use request id
This commit is contained in:
parent
97bf5edc54
commit
dad954ae16
66 changed files with 163 additions and 166 deletions
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue