Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.access
Class QueryLogger

    java.lang.Object
      org.apache.cayenne.access.QueryLogger

Deprecated. since 3.1 replaced by injectable `JdbcEventLogger`.

    @Deprecated
    public class QueryLogger

extends java.lang.Object

A static wrapper around `JdbcEventLogger`.

Constructor Summary
`QueryLogger()` Deprecated.

Method Summary
`static JdbcEventLogger` | `getLogger()` Deprecated.
`static boolean` | `isLoggable()` Deprecated. Returns true if current thread default log level is high enough for QueryLogger to generate output.
`static void` | `log(java.lang.String message)` Deprecated.
`static void` | `logBeginTransaction(java.lang.String transactionLabel)` Deprecated.
`static void` | `logCommitTransaction(java.lang.String transactionLabel)` Deprecated.
`static void` | `logConnect(java.lang.String dataSource)` Deprecated. Logs database connection event using container data source.
`static void` | `logConnect(java.lang.String url, java.lang.String userName, java.lang.String password)` Deprecated.
`static void` | `logConnectFailure(java.lang.Throwable th)` Deprecated.
`static void` | `logConnectSuccess()` Deprecated.
`static void` | `logGeneratedKey(DbAttribute attribute, java.lang.Object value)` Deprecated.
`static void` | `logPoolCreated(DataSourceInfo dsi)` Deprecated. Logs database connection event.
`static void` | `logQuery(java.lang.String queryStr, java.util.List<?> params)` Deprecated.
`static void` | `logQuery(java.lang.String queryStr, java.util.List<DbAttribute> attrs, java.util.List<?> params, long time)` Deprecated. Log query content using Log4J Category with "INFO" priority.
`static void` | `logQueryError(java.lang.Throwable th)` Deprecated.
`static void` | `logQueryParameters(java.lang.String label, java.util.List<DbAttribute> attrs, java.util.List<java.lang.Object> parameters, boolean isInserting)` Deprecated.
`static void` | `logQueryStart(int count)` Deprecated.
`static void` | `logRollbackTransaction(java.lang.String transactionLabel)` Deprecated.
`static void` | `logSelectCount(int count)` Deprecated.
`static void` | `logSelectCount(int count, long time)` Deprecated.
`static void` | `logUpdateCount(int count)` Deprecated.
`static void` | `setLogger(JdbcEventLogger logger)` Deprecated.
`static void` | `sqlLiteralForObject(java.lang.StringBuffer buffer, java.lang.Object object)` Deprecated. Appends SQL literal for the specified object to the buffer.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### QueryLogger

    public QueryLogger()

  Deprecated.

Method Detail

### setLogger

    public static void setLogger(JdbcEventLogger logger)

  Deprecated.

### getLogger

    public static JdbcEventLogger getLogger()

  Deprecated.

### sqlLiteralForObject

    public static void sqlLiteralForObject(java.lang.StringBuffer buffer,
                                           java.lang.Object object)

  Deprecated.
  Appends SQL literal for the specified object to the buffer. This is a utility method and is not intended to build SQL queries, rather this is used in logging routines. In particular it will trim large values to avoid flooding the logs.

  Parameters:
    `buffer` - buffer to append value
    `object` - object to be transformed to SQL literal.

### log

    public static void log(java.lang.String message)

  Deprecated.
  Since:
    1.2 logs an arbitrary message using logging level setup for QueryLogger.

### logConnect

    public static void logConnect(java.lang.String dataSource)

  Deprecated.
  Logs database connection event using container data source.

  Since:
    1.2

### logConnect

    public static void logConnect(java.lang.String url,
                                  java.lang.String userName,
                                  java.lang.String password)

  Deprecated.
  Since:
    1.2

### logPoolCreated

    public static void logPoolCreated(DataSourceInfo dsi)

  Deprecated.
  Logs database connection event.

  Since:
    1.2

### logConnectSuccess

    public static void logConnectSuccess()

  Deprecated.
  Since:
    1.2

### logConnectFailure

    public static void logConnectFailure(java.lang.Throwable th)

  Deprecated.
  Since:
    1.2

### logGeneratedKey

    public static void logGeneratedKey(DbAttribute attribute,
                                       java.lang.Object value)

  Deprecated.
  Since:
    3.0

### logQuery

    public static void logQuery(java.lang.String queryStr,
                                java.util.List<?> params)

  Deprecated.
  Since:
    1.2

### logQuery

    public static void logQuery(java.lang.String queryStr,
                                java.util.List<DbAttribute> attrs,
                                java.util.List<?> params,
                                long time)

  Deprecated.
  Log query content using Log4J Category with "INFO" priority.

  Parameters:
    `queryStr` - Query SQL string
    `attrs` - optional list of DbAttribute (can be null)
    `params` - optional list of query parameters that are used when executing query in prepared statement.
  Since:
    1.2

### logQueryParameters

    public static void logQueryParameters(java.lang.String label,
                                          java.util.List<DbAttribute> attrs,
                                          java.util.List<java.lang.Object> parameters,
                                          boolean isInserting)

  Deprecated.
  Since:
    1.2

### logSelectCount

    public static void logSelectCount(int count)

  Deprecated.
  Since:
    1.2

### logSelectCount

    public static void logSelectCount(int count,
                                      long time)

  Deprecated.
  Since:
    1.2

### logUpdateCount

    public static void logUpdateCount(int count)

  Deprecated.
  Since:
    1.2

### logBeginTransaction

    public static void logBeginTransaction(java.lang.String transactionLabel)

  Deprecated.
  Since:
    1.2

### logCommitTransaction

    public static void logCommitTransaction(java.lang.String transactionLabel)

  Deprecated.
  Since:
    1.2

### logRollbackTransaction

    public static void logRollbackTransaction(java.lang.String transactionLabel)

  Deprecated.
  Since:
    1.2

### logQueryError

    public static void logQueryError(java.lang.Throwable th)

  Deprecated.
  Since:
    1.2

### logQueryStart

    public static void logQueryStart(int count)

  Deprecated.
  Since:
    1.2

### isLoggable

    public static boolean isLoggable()

  Deprecated.
  Returns true if current thread default log level is high enough for QueryLogger to generate output.

  Since:
    1.2

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2011 Apache Cayenne. All Rights Reserved.