JdbcEventLogger
.@Deprecated public class QueryLogger extends Object
JdbcEventLogger
.Constructor and Description |
---|
QueryLogger()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
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(String message)
Deprecated.
|
static void |
logBeginTransaction(String transactionLabel)
Deprecated.
|
static void |
logCommitTransaction(String transactionLabel)
Deprecated.
|
static void |
logConnect(String dataSource)
Deprecated.
Logs database connection event using container data source.
|
static void |
logConnect(String url,
String userName,
String password)
Deprecated.
|
static void |
logConnectFailure(Throwable th)
Deprecated.
|
static void |
logConnectSuccess()
Deprecated.
|
static void |
logGeneratedKey(DbAttribute attribute,
Object value)
Deprecated.
|
static void |
logPoolCreated(DataSourceInfo dsi)
Deprecated.
Logs database connection event.
|
static void |
logQuery(String queryStr,
List<?> params)
Deprecated.
|
static void |
logQuery(String queryStr,
List<DbAttribute> attrs,
List<?> params,
long time)
Deprecated.
Log query content using Log4J Category with "INFO" priority.
|
static void |
logQueryError(Throwable th)
Deprecated.
|
static void |
logQueryParameters(String label,
List<DbAttribute> attrs,
List<Object> parameters,
boolean isInserting)
Deprecated.
|
static void |
logQueryStart(int count)
Deprecated.
|
static void |
logRollbackTransaction(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(StringBuffer buffer,
Object object)
Deprecated.
Appends SQL literal for the specified object to the buffer.
|
public static void setLogger(JdbcEventLogger logger)
public static JdbcEventLogger getLogger()
public static void sqlLiteralForObject(StringBuffer buffer, Object object)
buffer
- buffer to append valueobject
- object to be transformed to SQL literal.public static void log(String message)
public static void logConnect(String dataSource)
public static void logConnect(String url, String userName, String password)
public static void logPoolCreated(DataSourceInfo dsi)
public static void logConnectSuccess()
public static void logConnectFailure(Throwable th)
public static void logGeneratedKey(DbAttribute attribute, Object value)
public static void logQuery(String queryStr, List<DbAttribute> attrs, List<?> params, long time)
queryStr
- Query SQL stringattrs
- optional list of DbAttribute (can be null)params
- optional list of query parameters that are used when executing query
in prepared statement.public static void logQueryParameters(String label, List<DbAttribute> attrs, List<Object> parameters, boolean isInserting)
public static void logSelectCount(int count)
public static void logSelectCount(int count, long time)
public static void logUpdateCount(int count)
public static void logBeginTransaction(String transactionLabel)
public static void logCommitTransaction(String transactionLabel)
public static void logRollbackTransaction(String transactionLabel)
public static void logQueryError(Throwable th)
public static void logQueryStart(int count)
public static boolean isLoggable()
Copyright © 2001–2018 Apache Cayenne. All rights reserved.