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, writeAsJson| Constructor and Description |
|---|
CommonsQueryCountLoggingServletFilter() |
CommonsQueryCountLoggingServletFilter(CommonsLogLevel logLevel) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
initLogLevelFromFilterConfigIfSpecified(String logLevelParam) |
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 AbstractQueryCountLoggingServletFilterpublic void setLogLevel(CommonsLogLevel logLevel)
Copyright © 2015. All rights reserved.