Skip to content
Snippets Groups Projects
Commit b08605b1 authored by brinn's avatar brinn
Browse files

Making log message on creation and closing debug logs.

SVN: 26775
parent 7fd4349d
No related branches found
No related tags found
No related merge requests found
...@@ -44,9 +44,11 @@ public class MonitoringDataSource extends BasicDataSource ...@@ -44,9 +44,11 @@ public class MonitoringDataSource extends BasicDataSource
@Override @Override
public synchronized void setUrl(String url) public synchronized void setUrl(String url)
{ {
if (machineLog.isInfoEnabled()) if (machineLog.isDebugEnabled())
{ {
machineLog.info("Creating data source '" + url + "'."); final Throwable th = new Throwable();
th.fillInStackTrace();
machineLog.debug("Creating data source '" + url + "'.", th);
} }
super.setUrl(url); super.setUrl(url);
} }
...@@ -132,9 +134,12 @@ public class MonitoringDataSource extends BasicDataSource ...@@ -132,9 +134,12 @@ public class MonitoringDataSource extends BasicDataSource
@Override @Override
public synchronized void close() throws SQLException public synchronized void close() throws SQLException
{ {
final Throwable th = new Throwable(); if (machineLog.isDebugEnabled())
th.fillInStackTrace(); {
machineLog.warn("Closing data source '" + getUrl() + "'.", th); final Throwable th = new Throwable();
th.fillInStackTrace();
machineLog.debug("Closing data source '" + getUrl() + "'.", th);
}
super.close(); super.close();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment