Commit 14b323ec authored by Andre Freyssinet's avatar Andre Freyssinet

Avoid useless stacktraces in log.

parent c31ad8c1
......@@ -1257,16 +1257,18 @@ public final class AgentServer {
String tname = dis.readUTF();
transaction = (Transaction) Class.forName(tname).newInstance();
} catch (Exception exc) {
logmon.log(BasicLevel.FATAL,
if (logmon.isLoggable(BasicLevel.DEBUG))
logmon.log(BasicLevel.FATAL,
getName() + ", can't instantiate transaction manager", exc);
throw new Exception("Can't instantiate transaction manager");
throw new Exception("Can't instantiate transaction manager: " + exc.getMessage());
} finally {
if (dis != null) dis.close();
}
try {
transaction.init(path);
} catch (IOException exc) {
logmon.log(BasicLevel.FATAL,
if (logmon.isLoggable(BasicLevel.DEBUG))
logmon.log(BasicLevel.FATAL,
getName() + ", can't start transaction manager", exc);
throw new Exception("Can't start transaction manager: " + exc.getMessage());
}
......@@ -1544,7 +1546,10 @@ public final class AgentServer {
logmon.log(BasicLevel.ERROR, getName() + " jmx failed", exc);
}
} catch (Exception exc) {
logmon.log(BasicLevel.ERROR, getName() + "Cannot initialize", exc);
if (logmon.isLoggable(BasicLevel.DEBUG))
logmon.log(BasicLevel.ERROR, getName() + " cannot initialize", exc);
else
logmon.log(BasicLevel.ERROR, getName() + " cannot initialize: " + exc.getMessage());
synchronized(status) {
// AF: Will be replaced by a BAD_INITIALIZED status allowing the
// re-initialization..
......@@ -1552,7 +1557,10 @@ public final class AgentServer {
}
throw exc;
} catch (Throwable t) {
if (logmon.isLoggable(BasicLevel.DEBUG))
logmon.log(BasicLevel.ERROR, getName() + "Cannot initialize", t);
else
logmon.log(BasicLevel.ERROR, getName() + " cannot initialize: " + t.getMessage());
synchronized(status) {
// AF: Will be replaced by a BAD_INITIALIZED status allowing the
// re-initialization..
......
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