org.apache.cayenne.log

## Class FormattedSlf4jJdbcEventLogger

- java.lang.Object
- - org.apache.cayenne.log.Slf4jJdbcEventLogger
  - - org.apache.cayenne.log.FormattedSlf4jJdbcEventLogger

- All Implemented Interfaces:
    JdbcEventLogger

      public class FormattedSlf4jJdbcEventLogger
      extends Slf4jJdbcEventLogger

  A `Slf4jJdbcEventLogger` extension that provides pretty formatting of the logged SQL messages.
  Since:
    3.1, 4.0 renamed from FormattedCommonsJdbcEventLogger to FormattedSlf4jJdbcEventLogger as part of migration to SLF4J

- - ### Field Summary

    - ### Fields inherited from class org.apache.cayenne.log.Slf4jJdbcEventLogger

      `queryExecutionTimeLoggingThreshold`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FormattedSlf4jJdbcEventLogger(RuntimeProperties runtimeProperties)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `logQuery(String queryStr, List<DbAttribute> attrs, List<?> params, long time)` Deprecated.

    - ### Methods inherited from class org.apache.cayenne.log.Slf4jJdbcEventLogger

      `isLoggable, log, logBeginTransaction, logCommitTransaction, logConnect, logConnect, logConnectFailure, logConnectSuccess, logGeneratedKey, logPoolCreated, logQuery, logQuery, logQueryError, logQueryParameters, logQueryParameters, logRollbackTransaction, logSelectCount, logSelectCount, logUpdateCount`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FormattedSlf4jJdbcEventLogger

          public FormattedSlf4jJdbcEventLogger(RuntimeProperties runtimeProperties)

  - ### Method Detail

    - #### logQuery

          @Deprecated
          public void logQuery(String queryStr,
                                            List<DbAttribute> attrs,
                                            List<?> params,
                                            long time)

      Deprecated.
      Specified by:
        `logQuery` in interface `JdbcEventLogger`
      Overrides:
        `logQuery` in class `Slf4jJdbcEventLogger`

Copyright © 2001–2023 Apache Cayenne. All rights reserved.