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

@ -232,7 +232,7 @@ func (s *Stateless) PersistSession(
}
err = storeIdentityProfile(w, s.options.NewCookie(), s.cookieCipher, profile)
if err != nil {
log.Error(ctx).Err(err).Msg("failed to store identity profile")
log.Ctx(ctx).Error().Err(err).Msg("failed to store identity profile")
}
return nil
}
@ -293,7 +293,7 @@ func (s *Stateless) logAuthenticateEvent(r *http.Request, profile *identitypb.Pr
ctx := r.Context()
pub, params, err := hpke.DecryptURLValues(s.hpkePrivateKey, r.Form)
if err != nil {
log.Error(ctx).Err(err).Msg("log authenticate event: failed to decrypt request params")
log.Ctx(ctx).Error().Err(err).Msg("log authenticate event: failed to decrypt request params")
}
evt := events.AuthEvent{