add some properties for LogErrorEnabled

This commit is contained in:
DigitalSonic
2021-06-21 11:26:58 +08:00
parent b555a34165
commit f4eadc2cc8
@@ -122,11 +122,37 @@ public abstract class LogFilter extends FilterEventAdapter implements LogFilterM
statementExecutableSqlLogEnable = false;
}
}
{
String prop = properties.getProperty("druid.log.conn.logError");
if ("false".equals(prop)) {
connectionLogErrorEnabled = false;
} else if ("true".equals(prop)) {
connectionLogErrorEnabled = true;
}
}
{
String prop = properties.getProperty("druid.log.stmt.logError");
if ("false".equals(prop)) {
statementLogErrorEnabled = false;
} else if ("true".equals(prop)) {
statementLogErrorEnabled = true;
}
}
{
String prop = properties.getProperty("druid.log.rs.logError");
if ("false".equals(prop)) {
resultSetLogErrorEnabled = false;
} else if ("true".equals(prop)) {
resultSetLogErrorEnabled = true;
}
}
}
@Override
public void init(DataSourceProxy dataSource) {
this.dataSource = dataSource;
configFromProperties(dataSource.getConnectProperties());
configFromProperties(System.getProperties());
}
public boolean isConnectionLogErrorEnabled() {