Interface AdjustableSettings
Allows runtime adjustment of a discrete set of Hibernate settings.
- Since:
- 8.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidsetFormatLoggedSql(boolean newValue) Toggle whether Hibernate should format SQL prior to logging/showing it.voidsetLogJdbcErrors(boolean newValue) Toggles whether Hibernate should log any errors it receives interacting with the JDBC driver.voidsetLogJdbcWarnings(boolean newValue) Toggles whether Hibernate should log any warnings it receives interacting with the JDBC driver.voidsetShowSql(boolean newValue) Toggle whether Hibernate should log SQL to stdout.voidsetSlowSqlLoggingThreshold(long newValue) Specify a duration threshold, in milliseconds, beyond which Hibernate will consider a SQL execution "slow" and log it.
-
Method Details
-
setShowSql
-
setFormatLoggedSql
void setFormatLoggedSql(boolean newValue) Toggle whether Hibernate should format SQL prior to logging/showing it.- See Also:
-
setSlowSqlLoggingThreshold
void setSlowSqlLoggingThreshold(long newValue) Specify a duration threshold, in milliseconds, beyond which Hibernate will consider a SQL execution "slow" and log it. Any value less-than-or-equal-to zero will effectively disable this logging.- See Also:
-
setLogJdbcWarnings
void setLogJdbcWarnings(boolean newValue) Toggles whether Hibernate should log any warnings it receives interacting with the JDBC driver.- See Also:
-
setLogJdbcErrors
void setLogJdbcErrors(boolean newValue) Toggles whether Hibernate should log any errors it receives interacting with the JDBC driver.- See Also:
- API Note:
- Generally these errors are converted into other types of exceptions and thrown; enabling this opts-in to log-and-throw behavior.
-