Commit 58b99247 authored by Andre Freyssinet's avatar Andre Freyssinet

JORAM-337: decreases log level of somes messages.

parent bb66b3ae
......@@ -1196,7 +1196,7 @@ public final class AgentServer {
if (logmon.isLoggable(BasicLevel.DEBUG))
logmon.log(BasicLevel.DEBUG, getName() + ", init()", new Exception());
else
logmon.log(BasicLevel.WARN, getName() + ", init()");
logmon.log(BasicLevel.INFO, getName() + ", init()");
// Fix a Joram configuration as default.
if (defaultConfig == null)
......@@ -1248,7 +1248,8 @@ public final class AgentServer {
String tname = dis.readUTF();
transaction = (Transaction) Class.forName(tname).newInstance();
} catch (Exception exc) {
logmon.log(BasicLevel.FATAL, getName() + ", can't instantiate transaction manager", exc);
logmon.log(BasicLevel.FATAL,
getName() + ", can't instantiate transaction manager", exc);
throw new Exception("Can't instantiate transaction manager");
} finally {
if (dis != null) dis.close();
......@@ -1256,14 +1257,16 @@ public final class AgentServer {
try {
transaction.init(path);
} catch (IOException exc) {
logmon.log(BasicLevel.FATAL, getName() + ", can't start transaction manager", exc);
logmon.log(BasicLevel.FATAL,
getName() + ", can't start transaction manager", exc);
throw new Exception("Can't start transaction manager: " + exc.getMessage());
}
} else {
// TODO (AF): We should probably return an exception as the TFC file does not
// exist (normally the persistancy directory should be created by the transaction
// initialization).
logmon.log(BasicLevel.ERROR, getName() + ", TFC file does not exist");
logmon.log(BasicLevel.ERROR,
getName() + ", TFC file does not exist");
}
}
......@@ -1277,7 +1280,8 @@ public final class AgentServer {
try {
a3config = A3CMLConfig.load();
} catch (Exception exc) {
logmon.log(BasicLevel.WARN, getName() + ", config not found", exc);
logmon.log(BasicLevel.INFO,
getName() + ", config not found", exc);
}
}
......@@ -1289,7 +1293,8 @@ 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);
logmon.log(BasicLevel.INFO,
getName() + ", serialized a3cmlconfig not found", exc);
}
if (a3config == null) {
......@@ -1297,14 +1302,16 @@ public final class AgentServer {
try {
a3config = A3CML.getXMLConfig();
} catch (Exception exc) {
logmon.log(BasicLevel.WARN, getName() + ", XML configuration not found", exc);
logmon.log(BasicLevel.INFO,
getName() + ", XML configuration not found", exc);
}
}
if ((a3config == null) && (defaultConfig != null)) {
// Try to parse default XML configuration.
try {
logmon.log(BasicLevel.WARN, "Start AgentServer with configuration: \n" + defaultConfig);
logmon.log(BasicLevel.INFO,
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);
......@@ -1461,7 +1468,7 @@ public final class AgentServer {
// initializes fixed agents
engine.init(new AgentEngineContextImpl());
logmon.log(BasicLevel.WARN,
logmon.log(BasicLevel.INFO,
getName() + ", initialized at " + new Date());
// Commit all changes.
......@@ -1512,7 +1519,7 @@ public final class AgentServer {
if (logmon.isLoggable(BasicLevel.DEBUG))
logmon.log(BasicLevel.DEBUG, getName() + ", start()", new Exception());
else
logmon.log(BasicLevel.WARN, getName() + ", start()");
logmon.log(BasicLevel.INFO, getName() + ", start()");
synchronized(status) {
if ((status.value != Status.INITIALIZED) &&
......@@ -1552,7 +1559,7 @@ public final class AgentServer {
}
}
// The server is running.
logmon.log(BasicLevel.WARN, getName() + ", started at " + new Date());
logmon.log(BasicLevel.INFO, getName() + ", started at " + new Date());
// Commit all changes.
transaction.begin();
......@@ -1566,7 +1573,8 @@ public final class AgentServer {
// logmon.log(BasicLevel.FATAL, getName() + " initialize FileMonitoringTimerTask Ok");
if (checkServerTask != null) {
logmon.log(BasicLevel.WARN, getName() + ", schedule checkServer for " + checkServerTask.dtwarn + "ms.");
logmon.log(BasicLevel.INFO,
getName() + ", schedule checkServer for " + checkServerTask.dtwarn + "ms.");
timer.scheduleAtFixedRate(checkServerTask, checkServerTask.dtwarn, checkServerTask.dtwarn);
}
} catch (Exception exc) {
......@@ -1671,7 +1679,7 @@ public final class AgentServer {
if (logmon.isLoggable(BasicLevel.DEBUG))
logmon.log(BasicLevel.DEBUG, getName() + ", stop()", new Exception());
else
logmon.log(BasicLevel.WARN, getName() + ", stop()");
logmon.log(BasicLevel.INFO, getName() + ", stop()");
synchronized(status) {
if ((status.value != Status.STARTED) &&
......@@ -1740,7 +1748,7 @@ public final class AgentServer {
// we will remove it.
// System.runFinalization();
logmon.log(BasicLevel.WARN, getName() + ", stopped at " + new Date());
logmon.log(BasicLevel.INFO, getName() + ", stopped at " + new Date());
} catch (Throwable t) {
logmon.log(BasicLevel.ERROR, getName() + "Cannot stop", t);
synchronized(status) {
......@@ -1829,7 +1837,8 @@ class CheckServerTask extends TimerTask {
if (dterr < 10000) {
dterr = 10000;
logmon.log(BasicLevel.ERROR, AgentServer.getName() + " checkServer period cannot be less than 10s.");
logmon.log(BasicLevel.WARN,
AgentServer.getName() + " checkServer period cannot be less than 10s.");
}
this.dtwarn = dterr / 5;
this.dterr = dterr;
......@@ -1838,13 +1847,15 @@ class CheckServerTask extends TimerTask {
}
public void registerListener(CheckServerListener listener) {
logmon.log(BasicLevel.WARN, AgentServer.getName() + " registers listener for CheckServer.");
logmon.log(BasicLevel.INFO,
AgentServer.getName() + " registers listener for CheckServer.");
listeners.addElement(listener);
}
private void throwListeners() {
for (CheckServerListener listener : listeners) {
logmon.log(BasicLevel.WARN, AgentServer.getName() + " calls listener for CheckServer.");
logmon.log(BasicLevel.DEBUG,
AgentServer.getName() + " calls listener for CheckServer.");
listener.onServerCheckError();
}
}
......@@ -1874,7 +1885,7 @@ class CheckServerTask extends TimerTask {
}
private boolean checkEngine(long now) {
logmon.log(BasicLevel.WARN,
logmon.log(BasicLevel.DEBUG,
AgentServer.getName() + ".checkEngine():" + engine.getNbReactions() + ", " + reactCount);
if (engine.getNbReactions() > reactCount) {
......@@ -1886,7 +1897,8 @@ class CheckServerTask extends TimerTask {
if (! engine.isRunning()) {
// The engine does not run, just log a warn if needed
if (((now - lastEngineChangeDate) > dtwarn) && ((now - lastEngineWarnDate) > dtwarn)) {
logmon.log(BasicLevel.WARN, AgentServer.getName() + ", engine is not started.");
logmon.log(BasicLevel.DEBUG,
AgentServer.getName() + ", engine is not started.");
lastEngineWarnDate = now;
}
return false;
......@@ -1895,7 +1907,8 @@ class CheckServerTask extends TimerTask {
if (idleEngine()) {
// The engine was idle, just log a warn if needed
if (((now - lastEngineChangeDate) > dtwarn) && ((now - lastEngineWarnDate) > dtwarn)) {
logmon.log(BasicLevel.WARN, AgentServer.getName() + ", engine is idle.");
logmon.log(BasicLevel.WARN,
AgentServer.getName() + ", engine is idle.");
lastEngineWarnDate = now;
}
return false;
......@@ -1904,12 +1917,14 @@ class CheckServerTask extends TimerTask {
if (((now - lastEngineChangeDate) > dterr) && ((now - lastEngineWarnDate) > dtwarn)) {
// Log an error and throw an alert
logmon.log(BasicLevel.ERROR, AgentServer.getName() + ", the engine doesn't progress since " + new Date(lastEngineChangeDate));
logmon.log(BasicLevel.ERROR,
AgentServer.getName() + ", the engine doesn't progress since " + new Date(lastEngineChangeDate));
lastEngineWarnDate = now;
return true;
} else if (((now - lastEngineChangeDate) > dtwarn) && ((now - lastEngineWarnDate) > dtwarn)) {
// Log a warning
logmon.log(BasicLevel.WARN, AgentServer.getName() + ", the engine doesn't progress since " + new Date(lastEngineChangeDate));
logmon.log(BasicLevel.WARN,
AgentServer.getName() + ", the engine doesn't progress since " + new Date(lastEngineChangeDate));
lastEngineWarnDate = now;
return false;
}
......@@ -1922,7 +1937,7 @@ class CheckServerTask extends TimerTask {
long lastTransactionWarnDate = -1L;
private boolean checkTransaction(long now) {
logmon.log(BasicLevel.WARN,
logmon.log(BasicLevel.DEBUG,
AgentServer.getName() + ".checkTransaction()" + transaction.getCommitCount() + ", " + commitCount + "," + transaction.getPhase());
if (transaction.getCommitCount() > commitCount) {
......
......@@ -370,7 +370,7 @@ public abstract class Destination extends Agent implements DestinationMBean {
static {
strictCounters = AgentServer.getBoolean(DestinationConstants.DEST_STRICT_CPT);
// Be careful, may be logger is not already initialized!
Debug.getLogger(Destination.class.getName()).log(BasicLevel.WARN, "Force strict values for queue counters: " + strictCounters);
Debug.getLogger(Destination.class.getName()).log(BasicLevel.INFO, "Force strict values for queue counters: " + strictCounters);
}
protected long nbMsgsDeliverSinceCreation = 0;
......
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