Interface AdjustableSettings


@Incubating(since="8.0", group="adjustable-settings") public interface AdjustableSettings
Allows runtime adjustment of a discrete set of Hibernate settings.
Since:
8.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setFormatLoggedSql(boolean newValue)
    Toggle whether Hibernate should format SQL prior to logging/showing it.
    void
    setLogJdbcErrors(boolean newValue)
    Toggles whether Hibernate should log any errors it receives interacting with the JDBC driver.
    void
    setLogJdbcWarnings(boolean newValue)
    Toggles whether Hibernate should log any warnings it receives interacting with the JDBC driver.
    void
    setShowSql(boolean newValue)
    Toggle whether Hibernate should log SQL to stdout.
    void
    Specify a duration threshold, in milliseconds, beyond which Hibernate will consider a SQL execution "slow" and log it.
  • Method Details

    • setShowSql

      void setShowSql(boolean newValue)
      Toggle whether Hibernate should log SQL to stdout.
      See Also:
    • 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.