improve datasource log

This commit is contained in:
Yako
2014-10-22 16:46:00 +08:00
parent eed367c3ee
commit 38039e2480
@@ -626,7 +626,7 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
poolingPeakTime = System.currentTimeMillis();
}
} catch (SQLException ex) {
LOG.error("init datasource error", ex);
LOG.error("init datasource error, url: " + this.getUrl(), ex);
connectError = ex;
}
@@ -1768,7 +1768,7 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
try {
connection = createPhysicalConnection();
} catch (SQLException e) {
LOG.error("create connection error", e);
LOG.error("create connection error, url: " + jdbcUrl, e);
errorCount++;
@@ -1843,7 +1843,7 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
try {
connection = createPhysicalConnection();
} catch (SQLException e) {
LOG.error("create connection error", e);
LOG.error("create connection error, url: " + jdbcUrl, e);
errorCount++;
@@ -2635,7 +2635,7 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
Connection conn = createPhysicalConnection();
holder = new DruidConnectionHolder(this, conn);
} catch (SQLException e) {
LOG.error("fill connection error", e);
LOG.error("fill connection error, url: " + this.jdbcUrl, e);
connectErrorCount.incrementAndGet();
throw e;
}