public class CommonsQueryCountLoggingServletFilter extends AbstractQueryCountLoggingServletFilter
Some application server reuse threads without cleaning thread local values. Default, this filter clear the thread local value used to hold the query metrics. If you do not want to clear the thread local value, set "clearQueryCounter", a servlet parameter, to false.
Also, you can set a log level.
CommonsQueryCountLoggingHandlerInterceptor,
CommonsQueryCountLoggingRequestListenerCLEAR_QUERY_COUNTER_PARAM, clearQueryCounter, FORMAT_PARAM, LOG_LEVEL_PARAM, logFormatter, LOGGER_NAME, writeAsJson| Constructor and Description |
|---|
CommonsQueryCountLoggingServletFilter() |
CommonsQueryCountLoggingServletFilter(CommonsLogLevel logLevel) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
initLogLevelFromFilterConfigIfSpecified(String logLevelParam) |
protected void |
resetLogger(String loggerName)
Callback method to reset the logger object in concrete class when log name is specified.
|
void |
setLog(org.apache.commons.logging.Log log)
Override
Log instance. |
void |
setLogLevel(CommonsLogLevel logLevel) |
protected void |
writeLog(String message) |
destroy, doFilter, init, setClearQueryCounter, setLogFormatter, setWriteAsJsonpublic CommonsQueryCountLoggingServletFilter()
public CommonsQueryCountLoggingServletFilter(CommonsLogLevel logLevel)
protected void initLogLevelFromFilterConfigIfSpecified(String logLevelParam)
initLogLevelFromFilterConfigIfSpecified in class AbstractQueryCountLoggingServletFilterprotected void writeLog(String message)
writeLog in class AbstractQueryCountLoggingServletFilterprotected void resetLogger(String loggerName)
AbstractQueryCountLoggingServletFilterresetLogger in class AbstractQueryCountLoggingServletFilterloggerName - logger namepublic void setLogLevel(CommonsLogLevel logLevel)
public void setLog(org.apache.commons.logging.Log log)
Log instance.log - new log instanceCopyright © 2023. All rights reserved.