FormattedSlf4jJdbcEventLogger (cayenne-doc: Cayenne Documentation 5.0-M2 API)
Description: declaration: package: org.apache.cayenne.log, class: FormattedSlf4jJdbcEventLogger

# 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 Slf4jJdbcEventLogger

  `queryExecutionTimeLoggingThreshold`
  Modifier and Type
  Field
  Description
  `protected long`
  `queryExecutionTimeLoggingThreshold`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FormattedSlf4jJdbcEventLogger(RuntimeProperties runtimeProperties)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `logQuery(String sql, ParameterBinding[] bindings)`

  ### Methods inherited from class Slf4jJdbcEventLogger

  `appendParameters, isLoggable, log, logBeginTransaction, logCommitTransaction, logGeneratedKey, logQueryError, logQueryParameters, logRollbackTransaction, logSelectCount, logSelectCount, logUpdateCount`
  Modifier and Type
  Method
  Description
  `protected void`
  `appendParameters(StringBuilder buffer, String label, ParameterBinding[] bindings)`
  `boolean`
  `isLoggable()`
  Returns true if current thread default log level is high enough to generate output.
  `void`
  `log(String message)`
  Logs an arbitrary message.
  `void`
  `logBeginTransaction(String transactionLabel)`
  `void`
  `logCommitTransaction(String transactionLabel)`
  `void`
  `logGeneratedKey(DbAttribute attribute, Object value)`
  `void`
  `logQueryError(Throwable th)`
  `void`
  `logQueryParameters(String label, ParameterBinding[] bindings)`
  `void`
  `logRollbackTransaction(String transactionLabel)`
  `void`
  `logSelectCount(int count, long time)`
  `void`
  `logSelectCount(int count, long time, String sql)`
  `void`
  `logUpdateCount(int count)`

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### FormattedSlf4jJdbcEventLogger

    public FormattedSlf4jJdbcEventLogger(RuntimeProperties runtimeProperties)

- ## Method Details

  - ### logQuery

    public void logQuery(String sql, ParameterBinding[] bindings)
    Specified by:
      `logQuery` in interface `JdbcEventLogger`
    Overrides:
      `logQuery` in class `Slf4jJdbcEventLogger`