Package org.apache.cayenne.log

# Interface JdbcEventLogger

All Known Implementing Classes:
  `CompactSlf4jJdbcEventLogger`, `FormattedSlf4jJdbcEventLogger`, `NoopJdbcEventLogger`, `Slf4jJdbcEventLogger`

public interface JdbcEventLogger
A logging service used by Cayenne to output database interactions.

Since:
  3.1

- ## Method Summary

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

- ## Method Details

  - ### log

    void log(String message)
    Logs an arbitrary message.

  - ### logGeneratedKey

    void logGeneratedKey(DbAttribute attribute, Object value)

  - ### logQuery

    void logQuery(String sql, ParameterBinding[] bindings)
    Since:
      4.0

  - ### logQueryParameters

    void logQueryParameters(String label, ParameterBinding[] bindings)
    Since:
      4.0

  - ### logSelectCount

    void logSelectCount(int count, long time)

  - ### logSelectCount

    void logSelectCount(int count, long time, String sql)
    Parameters:
      `count` - of selected rows
      `time` - (milliseconds) time query took to run
      `sql` - SQL that was executed, printed when time exceeds timeThreshold
    Since:
      4.0

  - ### logUpdateCount

    void logUpdateCount(int count)

  - ### logBeginTransaction

    void logBeginTransaction(String transactionLabel)

  - ### logCommitTransaction

    void logCommitTransaction(String transactionLabel)

  - ### logRollbackTransaction

    void logRollbackTransaction(String transactionLabel)

  - ### logQueryError

    void logQueryError(Throwable th)

  - ### isLoggable

    boolean isLoggable()
    Returns true if current thread default log level is high enough to generate output.