Commit 54a12650 authored by Andre Freyssinet's avatar Andre Freyssinet

Logging enhancements.

parent 5ee64ebf
...@@ -496,11 +496,6 @@ public abstract class DBTransaction extends AbstractTransaction implements DBTra ...@@ -496,11 +496,6 @@ public abstract class DBTransaction extends AbstractTransaction implements DBTra
break; break;
} }
if (logmon.isLoggable(BasicLevel.DEBUG))
logmon.log(BasicLevel.WARN, "DBTransaction, commit: try to reconnect", sqle);
else
logmon.log(BasicLevel.WARN, "DBTransaction, commit: try to reconnect - " + sqle.getMessage());
try { try {
// Do not wait the 1st time. // Do not wait the 1st time.
if (lastTry != 0L) { if (lastTry != 0L) {
...@@ -510,6 +505,12 @@ public abstract class DBTransaction extends AbstractTransaction implements DBTra ...@@ -510,6 +505,12 @@ public abstract class DBTransaction extends AbstractTransaction implements DBTra
if (delay > 0) Thread.sleep(delay); if (delay > 0) Thread.sleep(delay);
} catch (InterruptedException exc) {} } catch (InterruptedException exc) {}
} }
if (logmon.isLoggable(BasicLevel.DEBUG))
logmon.log(BasicLevel.WARN, "DBTransaction, commit: try to reconnect", sqle);
else
logmon.log(BasicLevel.WARN, "DBTransaction, commit: try to reconnect - " + sqle.getMessage());
lastTry = System.currentTimeMillis(); lastTry = System.currentTimeMillis();
connectDB(); connectDB();
createPreparedStatement(); createPreparedStatement();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment