mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed sql runningCount & add statLog support
This commit is contained in:
@@ -251,6 +251,25 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements
|
||||
this.useLocalSessionState = useLocalSessionState;
|
||||
}
|
||||
|
||||
public DruidDataSourceStatLogger getStatLogger() {
|
||||
return statLogger;
|
||||
}
|
||||
|
||||
public void setStatLoggerClassName(String className) {
|
||||
Class<?> clazz;
|
||||
try {
|
||||
clazz = Class.forName(className);
|
||||
DruidDataSourceStatLogger statLogger = (DruidDataSourceStatLogger) clazz.newInstance();
|
||||
this.setStatLogger(statLogger);
|
||||
} catch (Exception e) {
|
||||
throw new IllegalArgumentException(className, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void setStatLogger(DruidDataSourceStatLogger statLogger) {
|
||||
this.statLogger = statLogger;
|
||||
}
|
||||
|
||||
public long getTimeBetweenLogStatsMillis() {
|
||||
return timeBetweenLogStatsMillis;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user