Commit 4073d7eb authored by Andre Freyssinet's avatar Andre Freyssinet
Browse files

Avoids warning when reseted a server in INSTALLED status.

parent 903fb32b
......@@ -1197,6 +1197,11 @@ public final class AgentServer {
*/
public static void reset() {
synchronized(status) {
if (status.value == Status.INSTALLED) {
// The server is already reseted, avoid a useless warning.
logmon.log(BasicLevel.INFO, getName() + ", already reseted.");
return;
}
if (status.value != Status.STOPPED) {
logmon.log(BasicLevel.WARN,
getName() + ", cannot reset, bad status: " + getStatusInfo());
......@@ -1552,7 +1557,10 @@ public final class AgentServer {
LoggerFactory loggerFactory) throws Exception {
name = new StringBuffer("AgentServer#").append(sid).toString();
if (loggerFactory != null) Debug.setLoggerFactory(loggerFactory);
if (loggerFactory != null) {
System.err.println("AgentServer.init: Could not set logger factory.");
// Debug.setLoggerFactory(loggerFactory);
}
logmon = Debug.getLogger(AgentServer.class.getName() + ".#" + sid);
if (logmon.isLoggable(BasicLevel.DEBUG))
......
Supports Markdown
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