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
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 {
// Do not wait the 1st time.
if (lastTry != 0L) {
......@@ -510,6 +505,12 @@ public abstract class DBTransaction extends AbstractTransaction implements DBTra
if (delay > 0) Thread.sleep(delay);
} 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();
connectDB();
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