Commit 577148cc authored by Andre Freyssinet's avatar Andre Freyssinet

Logging enhancements.

parent 5dbf5e20
......@@ -1292,8 +1292,10 @@ public final class AgentServer {
try {
a3config = A3CMLConfig.load();
} catch (Exception exc) {
logmon.log(BasicLevel.INFO,
getName() + ", config not found", exc);
if (logmon.isLoggable(BasicLevel.DEBUG))
logmon.log(BasicLevel.INFO, getName() + ", config not found", exc);
else
logmon.log(BasicLevel.INFO, getName() + ", config not found");
}
// Verify if the configuration has been updated since last boot.
updatecfg = (ServerUpdate) transaction.load(UPDATE_CONF_TX_NAME);
......@@ -1316,8 +1318,10 @@ public final class AgentServer {
// TODO (AF): Is it used ? During Mediation deployment ?
a3config = A3CMLConfig.getConfig(DEFAULT_SER_CFG_FILE);
} catch (Exception exc) {
logmon.log(BasicLevel.INFO,
getName() + ", serialized a3cmlconfig not found", exc);
if (logmon.isLoggable(BasicLevel.DEBUG))
logmon.log(BasicLevel.INFO, getName() + ", serialized a3cmlconfig not found", exc);
else
logmon.log(BasicLevel.INFO, getName() + ", serialized a3cmlconfig not found");
}
if (a3config == null) {
......@@ -1325,8 +1329,10 @@ public final class AgentServer {
try {
a3config = A3CML.getXMLConfig();
} catch (Exception exc) {
logmon.log(BasicLevel.INFO,
getName() + ", XML configuration not found", exc);
if (logmon.isLoggable(BasicLevel.DEBUG))
logmon.log(BasicLevel.INFO, getName() + ", XML configuration not found", exc);
else
logmon.log(BasicLevel.INFO, getName() + ", XML configuration not found");
}
}
......@@ -1337,7 +1343,10 @@ public final class AgentServer {
getName() + ", start AgentServer with configuration: \n" + defaultConfig);
a3config = A3CML.getConfig(new StringReader(defaultConfig));
} catch (Exception exc) {
logmon.log(BasicLevel.ERROR, getName() + ", bad default XML configuration", exc);
if (logmon.isLoggable(BasicLevel.DEBUG))
logmon.log(BasicLevel.ERROR, getName() + ", bad default XML configuration", exc);
else
logmon.log(BasicLevel.ERROR, getName() + ", bad default XML configuration");
}
}
......
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