Package org.apache.cayenne.log
Class NoopJdbcEventLogger
- java.lang.Object
-
- org.apache.cayenne.log.NoopJdbcEventLogger
-
- All Implemented Interfaces:
JdbcEventLogger
public class NoopJdbcEventLogger extends Object implements JdbcEventLogger
Noop implementation of JdbcEventLogger- Since:
- 3.1
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NoopJdbcEventLoggergetInstance()booleanisLoggable()Returns true if current thread default log level is high enough to generate output.voidlog(String message)Logs an arbitrary message.voidlogBeginTransaction(String transactionLabel)voidlogCommitTransaction(String transactionLabel)voidlogGeneratedKey(DbAttribute attribute, Object value)voidlogQuery(String sql, ParameterBinding[] bindings)voidlogQueryError(Throwable th)voidlogQueryParameters(String label, ParameterBinding[] bindings)voidlogRollbackTransaction(String transactionLabel)voidlogSelectCount(int count, long time)voidlogSelectCount(int count, long time, String sql)voidlogUpdateCount(int count)
-
-
-
Method Detail
-
getInstance
public static NoopJdbcEventLogger getInstance()
-
log
public void log(String message)
Description copied from interface:JdbcEventLoggerLogs an arbitrary message.- Specified by:
login interfaceJdbcEventLogger
-
logGeneratedKey
public void logGeneratedKey(DbAttribute attribute, Object value)
- Specified by:
logGeneratedKeyin interfaceJdbcEventLogger
-
logQuery
public void logQuery(String sql, ParameterBinding[] bindings)
- Specified by:
logQueryin interfaceJdbcEventLogger
-
logQueryParameters
public void logQueryParameters(String label, ParameterBinding[] bindings)
- Specified by:
logQueryParametersin interfaceJdbcEventLogger
-
logSelectCount
public void logSelectCount(int count, long time)- Specified by:
logSelectCountin interfaceJdbcEventLogger
-
logSelectCount
public void logSelectCount(int count, long time, String sql)- Specified by:
logSelectCountin interfaceJdbcEventLogger- Parameters:
count- of selected rowstime- (milliseconds) time query took to runsql- SQL that was executed, printed when time exceeds timeThreshold
-
logUpdateCount
public void logUpdateCount(int count)
- Specified by:
logUpdateCountin interfaceJdbcEventLogger
-
logBeginTransaction
public void logBeginTransaction(String transactionLabel)
- Specified by:
logBeginTransactionin interfaceJdbcEventLogger
-
logCommitTransaction
public void logCommitTransaction(String transactionLabel)
- Specified by:
logCommitTransactionin interfaceJdbcEventLogger
-
logRollbackTransaction
public void logRollbackTransaction(String transactionLabel)
- Specified by:
logRollbackTransactionin interfaceJdbcEventLogger
-
logQueryError
public void logQueryError(Throwable th)
- Specified by:
logQueryErrorin interfaceJdbcEventLogger
-
isLoggable
public boolean isLoggable()
Description copied from interface:JdbcEventLoggerReturns true if current thread default log level is high enough to generate output.- Specified by:
isLoggablein interfaceJdbcEventLogger
-
-