public abstract class AbstractQueryLoggingListener extends Object implements QueryExecutionListener
| Modifier and Type | Field and Description |
|---|---|
protected LoggingCondition |
loggingCondition |
protected LoggingFilter |
loggingFilter |
protected QueryLogEntryCreator |
queryLogEntryCreator |
protected boolean |
writeConnectionId |
protected boolean |
writeDataSourceName |
protected boolean |
writeIsolation |
DEFAULT| Constructor and Description |
|---|
AbstractQueryLoggingListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterQuery(ExecutionInfo execInfo,
List<QueryInfo> queryInfoList) |
void |
beforeQuery(ExecutionInfo execInfo,
List<QueryInfo> queryInfoList) |
protected String |
getEntry(ExecutionInfo execInfo,
List<QueryInfo> queryInfoList) |
LoggingFilter |
getLoggingFilter() |
QueryLogEntryCreator |
getQueryLogEntryCreator() |
protected void |
resetLogger(String loggerName)
Deprecated.
use
setLog(String) or setLogger(String) |
void |
setLoggerName(String loggerName)
Deprecated.
use
setLog(String) or setLogger(String) |
void |
setLoggingCondition(LoggingCondition loggingCondition)
A boolean supplier that determines whether to perform logging logic.
|
void |
setLoggingFilter(LoggingFilter loggingFilter)
Filter that controls which queries are logged.
|
void |
setQueryLogEntryCreator(QueryLogEntryCreator queryLogEntryCreator) |
void |
setWriteConnectionId(boolean writeConnectionId) |
void |
setWriteDataSourceName(boolean writeDataSourceName) |
void |
setWriteIsolation(boolean writeIsolation) |
protected abstract void |
writeLog(String message) |
protected QueryLogEntryCreator queryLogEntryCreator
protected boolean writeDataSourceName
protected boolean writeConnectionId
protected boolean writeIsolation
protected LoggingCondition loggingCondition
protected LoggingFilter loggingFilter
public void beforeQuery(ExecutionInfo execInfo, List<QueryInfo> queryInfoList)
beforeQuery in interface QueryExecutionListenerpublic void afterQuery(ExecutionInfo execInfo, List<QueryInfo> queryInfoList)
afterQuery in interface QueryExecutionListenerprotected String getEntry(ExecutionInfo execInfo, List<QueryInfo> queryInfoList)
protected abstract void writeLog(String message)
@Deprecated public void setLoggerName(String loggerName)
setLog(String) or setLogger(String)loggerName - logger name@Deprecated protected void resetLogger(String loggerName)
setLog(String) or setLogger(String)loggerName - logger namepublic void setQueryLogEntryCreator(QueryLogEntryCreator queryLogEntryCreator)
public QueryLogEntryCreator getQueryLogEntryCreator()
public void setWriteDataSourceName(boolean writeDataSourceName)
public void setWriteConnectionId(boolean writeConnectionId)
public void setWriteIsolation(boolean writeIsolation)
public void setLoggingCondition(LoggingCondition loggingCondition)
loggingCondition - boolean supplierpublic void setLoggingFilter(LoggingFilter loggingFilter)
loggingFilter - the filter to usepublic LoggingFilter getLoggingFilter()
Copyright © 2025. All rights reserved.