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

@ -70,7 +70,7 @@ func (tracker *AccessTracker) Run(ctx context.Context) {
}
runSubmit := func() {
if dropped := atomic.SwapInt64(&tracker.droppedAccesses, 0); dropped > 0 {
log.Error(ctx).
log.Ctx(ctx).Error().
Int64("dropped", dropped).
Msg("authorize: failed to track all session accesses")
}
@ -84,7 +84,7 @@ func (tracker *AccessTracker) Run(ctx context.Context) {
return err == nil
})
if err != nil {
log.Error(ctx).Err(err).Msg("authorize: error updating session last access timestamp")
log.Ctx(ctx).Error().Err(err).Msg("authorize: error updating session last access timestamp")
return
}
@ -93,7 +93,7 @@ func (tracker *AccessTracker) Run(ctx context.Context) {
return err == nil
})
if err != nil {
log.Error(ctx).Err(err).Msg("authorize: error updating service account last access timestamp")
log.Ctx(ctx).Error().Err(err).Msg("authorize: error updating service account last access timestamp")
return
}