mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:37:32 +00:00
fix(logging): reduce log level of errors in introspection and login UI (#8047)
# Which Problems Are Solved Introspection errors such as invalid audience and errors in the login UI such as invalid user agents where all logged as severity error. # How the Problems Are Solved Log level for both general loggers is changed to `info`. # Additional Changes None # Additional Context - internal discussion
This commit is contained in:
@@ -80,7 +80,11 @@ func (s *Server) Introspect(ctx context.Context, r *op.Request[op.IntrospectionR
|
||||
// with active: false
|
||||
defer func() {
|
||||
if err != nil {
|
||||
s.getLogger(ctx).ErrorContext(ctx, "oidc introspection", "err", err)
|
||||
if zerrors.IsInternal(err) {
|
||||
s.getLogger(ctx).ErrorContext(ctx, "oidc introspection", "err", err)
|
||||
} else {
|
||||
s.getLogger(ctx).InfoContext(ctx, "oidc introspection", "err", err)
|
||||
}
|
||||
resp, err = op.NewResponse(new(oidc.IntrospectionResponse)), nil
|
||||
}
|
||||
}()
|
||||
|
@@ -342,7 +342,11 @@ func (l *Login) renderInternalError(w http.ResponseWriter, r *http.Request, auth
|
||||
if authReq != nil {
|
||||
log = log.WithField("auth_req_id", authReq.ID)
|
||||
}
|
||||
log.Error()
|
||||
if zerrors.IsInternal(err) {
|
||||
log.Error()
|
||||
} else {
|
||||
log.Info()
|
||||
}
|
||||
|
||||
_, msg = l.getErrorMessage(r, err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user