Debug flag now depends on file.

This commit is contained in:
Jonathan Williams 2015-01-10 13:19:33 -08:00
parent 0d27649e85
commit 0a99a9aa40

View File

@ -52,6 +52,7 @@ public class ServerMonitor
public static void main (String args[])
{
_region = !new File("eu.dat").exists() ? Region.US : Region.EU;
_debug = new File("debug.dat").exists();
_repository = ServerManager.getServerRepository(_region); // Fetches and connects to server repo
File logFile = new File("monitor.log");
@ -132,6 +133,9 @@ public class ServerMonitor
totalCPU += serverData.getAvailableCpu();
totalRAM += serverData.getAvailableRam();
}
if (_debug)
log("Server : " + serverData.getName() + " CPU : " + serverData.getAvailableCpu() + " RAM : " + serverData.getAvailableRam());
}
log(_badServers.size() + " bad servers.");