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
    Modifier and Type | Method and Description
    --- | ---
    `void` | `logQuery(String sql, ParameterBinding[] bindings)`

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

      `appendParameters, isLoggable, log, logBeginTransaction, logCommitTransaction, logGeneratedKey, logQueryError, 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

          public void logQuery(String sql,
                               ParameterBinding[] bindings)

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

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