@@ -86,7 +86,6 @@ public class Election {
if (status == Status.DOWN) break;
}
try {
- LOG.fine("Main loop\n\n");
check();
merge();
recovery();
@@ -131,7 +130,7 @@ public class Election {
public synchronized void start() {
if (status == null) {
- LOG.fine("Starting Node " + id + "...");
+ LOG.fine("Starting Node " + id + "...\n");
setStatus(Status.RECOVERY);
receiverThread.start();
mainThread.start();
@@ -140,7 +139,7 @@ public class Election {
public void stop() throws InterruptedException {
synchronized(this) {
- LOG.fine("Stopping Node " + id + " ...");
+ LOG.fine("Stopping Node " + id + " ...\n");
setStatus(Status.DOWN);
}
mainThread.join();
@@ -335,7 +334,7 @@ public class Election {
wait(Configurator.getAreYouThereTimeout());
if (!isCoordinatorAlive) {
- LOG.fine("Coordinator is not alive in node " + id + "!!!");
+ LOG.fine("Coordinator is not alive in node " + id + "!!!\n");
setStatus(Status.RECOVERY);
}
}
@@ -361,7 +360,7 @@ public class Election {
}
private void setGroupAndCoordinator(long group, Node groupCoordinator) {
- LOG.fine("Changing to group " + group + " coordinator " + groupCoordinator + " in node " + id + "\n\n");
+ LOG.fine("Changing to group " + group + " coordinator " + groupCoordinator + " in node " + id + "\n");
this.group = group;
this.groupCoordinator = groupCoordinator;
}
@@ -73,7 +73,7 @@ public class Container implements Serializable {
for(File file : directory.listFiles()) {
if (!file.isFile()) continue;
if (file.getName().startsWith(".")) continue;
- if (file.getName().startsWith("dfs") && file.getName().endsWith(".log")) continue;
+ if (file.getName().startsWith("dfs.log")) continue;
if (file.getName().equals("index.dat") || file.getName().equals("config.ini")) continue;
LOG.fine("Found file " + file.getName());
@@ -7,9 +7,7 @@ handlers = java.util.logging.FileHandler, java.util.logging.ConsoleHandler
.level = ALL
org.hnaves.dfs.repository.level=WARNING
-org.hnaves.dfs.election.pattern = dfs-election.log
org.hnaves.dfs.election.socket.level=WARNING
-org.hnaves.dfs.election.socket.pattern = dfs-election-socket.log
java.util.logging.FileHandler.level = ALL
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter