Restructured so that log messages are less noisy

This commit is contained in:
Simon Pamies committed 2013-01-10 10:55:50 +01:00
1 parent 6591a1ac09
commit af61edbd44
1 file changed
+3 -3
@@ -113,16 +113,16 @@ public abstract class AbstractPortMonitor extends Thread {
}
}
} catch (SocketTimeoutException|ConnectException ex) {
log.info("Connection FAILED to " + currentendpoint.toString());
/* if service has failed before then wait at least some time before checking it again */
boolean handle = true;
if (currentendpoint.hasFailed() /* failed before */) {
if ( (currentendpoint.lastFailed()+Integer.parseInt(properties.getProperty("monitor.wait_after_failure", "60000"))) > System.currentTimeMillis()) {
handle = false;
} else {
log.info("Service has failed before but gracetime is over. Calling failure handler again.");
log.info("Service has failed (" + currentendpoint.toString() + ") before and gracetime is over. Calling failure handler again.");
}
} else {
log.info("Connection FAILED to " + currentendpoint.toString());
}
if (handle) {