mirror of
https://github.com/keycloak/keycloak.git
synced 2026-06-09 00:52:07 -04:00
Avoid log-and-throw for Hibernate's SQL exceptions
Closes #49265 Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
This commit is contained in:
parent
4ac2dad432
commit
21ca050027
2 changed files with 4 additions and 5 deletions
|
|
@ -630,6 +630,10 @@ class KeycloakProcessor {
|
|||
unitProperties.put(AvailableSettings.USE_SQL_COMMENTS, "true");
|
||||
}
|
||||
|
||||
// SqlExceptionHelper should not log-and-throw error messages.
|
||||
// As those messages might later be caught and handled, this is an antipattern so we prevent logging them.
|
||||
unitProperties.put(JdbcSettings.LOG_JDBC_ERRORS, "false");
|
||||
|
||||
getOptionalKcValue(DatabaseOptions.DB_SQL_LOG_SLOW_QUERIES.getKey())
|
||||
.ifPresent(v -> unitProperties.put(AvailableSettings.LOG_SLOW_QUERY, v));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,11 +31,6 @@ quarkus.log.category."io.quarkus.arc.processor.IndexClassLookupUtils".level=off
|
|||
quarkus.log.category."io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor".level=warn
|
||||
quarkus.log.category."io.quarkus.deployment.steps.ReflectiveHierarchyStep".level=error
|
||||
|
||||
# SqlExceptionHelper will log-and-throw error messages.
|
||||
# As those messages might later be caught and handled, this is an antipattern so we prevent logging them
|
||||
# https://hibernate.zulipchat.com/#narrow/channel/132096-hibernate-user/topic/Feature.20Request.3A.20Disable.20logging.20of.20SqlExceptionHelper.20for
|
||||
quarkus.log.category."org.hibernate.engine.jdbc.spi.SqlExceptionHelper".level=off
|
||||
|
||||
# Disable irrelevant EDB warning: EnterpriseDB does not store DATE columns. Instead, it auto-converts them to TIMESTAMPs. (edb_redwood_date=true)
|
||||
quarkus.log.category."liquibase.database.core.PostgresDatabase".level=error
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue