Merge remote-tracking branch 'upstream/master'

This commit is contained in:
高铁
2015-12-13 15:27:41 +08:00
3 changed files with 24 additions and 7 deletions
@@ -2414,7 +2414,7 @@ public class DruidDataSource extends DruidAbstractDataSource
// 5 - 9
map.put("CloseCount", this.getCloseCount());
map.put("ActiveCount", this.getActivePeak());
map.put("ActiveCount", this.getActiveCount());
map.put("PoolingCount", this.getPoolingCount());
map.put("LockQueueLength", this.getLockQueueLength());
map.put("WaitThreadCount", this.getNotEmptyWaitThreadPeak());
@@ -62,14 +62,18 @@ public class OracleInsertStatement extends SQLInsertStatement implements OracleS
public void accept0(OracleASTVisitor visitor) {
if (visitor.visit(this)) {
this.acceptChild(visitor, tableSource);
this.acceptChild(visitor, columns);
this.acceptChild(visitor, values);
this.acceptChild(visitor, query);
this.acceptChild(visitor, getTableSource());
this.acceptChild(visitor, getColumns());
this.acceptChild(visitor, getValues());
this.acceptChild(visitor, getQuery());
this.acceptChild(visitor, returning);
this.acceptChild(visitor, errorLogging);
}
visitor.endVisit(this);
}
public void output(StringBuffer buf) {
new OracleOutputVisitor(buf).visit(this);
}
}
@@ -23,8 +23,21 @@ public class LogFactory {
private static Constructor logConstructor;
static {
// TODO add slf4j logging
String logType= System.getProperty("druid.logType");
if(logType != null){
if(logType.equalsIgnoreCase("slf4j")){
tryImplementation("org.slf4j.Logger", "com.alibaba.druid.support.logging.SLF4JImpl");
}else if(logType.equalsIgnoreCase("log4j")){
tryImplementation("org.apache.log4j.Logger", "com.alibaba.druid.support.logging.Log4jImpl");
}else if(logType.equalsIgnoreCase("log4j2")){
tryImplementation("org.apache.logging.log4j.Logger", "com.alibaba.druid.support.logging.Log4j2Impl");
}else if(logType.equalsIgnoreCase("commonsLog")){
tryImplementation("org.apache.commons.logging.LogFactory",
"com.alibaba.druid.support.logging.JakartaCommonsLoggingImpl");
}else if(logType.equalsIgnoreCase("jdkLog")){
tryImplementation("java.util.logging.Logger", "com.alibaba.druid.support.logging.Jdk14LoggingImpl");
}
}
// 优先选择log4j,而非Apache Common Logging. 因为后者无法设置真实Log调用者的信息
tryImplementation("org.apache.log4j.Logger", "com.alibaba.druid.support.logging.Log4jImpl");
tryImplementation("org.apache.logging.log4j.Logger", "com.alibaba.druid.support.logging.Log4j2Impl");