From 2d8456c9758acb824a14a21478d14095c1a0a8a7 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Fri, 13 Nov 2020 02:27:54 +0300 Subject: [PATCH] Added logger. Not incomplete. --- src/MakkahCity.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/MakkahCity.java b/src/MakkahCity.java index 11831f7..daeff04 100644 --- a/src/MakkahCity.java +++ b/src/MakkahCity.java @@ -1,4 +1,8 @@ +import sun.rmi.runtime.Log; + import java.util.*; +import java.util.logging.Level; +import java.util.logging.Logger; public class MakkahCity { @@ -19,9 +23,12 @@ public class MakkahCity { ); private static PDate currenttimeManager = firstDayTimeMan; + private static Logger log = Logger.getLogger("MakkahCity"); + public static void main(String[] args) { - + log.setLevel(Level.FINE); + log.info("Starting Hajj-simulation"); //Gen Camp campPerDistrict[District.ALMANSOOR.ordinal()] = new ArrayList<>(); campPerDistrict[District.ALAZIZIYA.ordinal()] = new ArrayList<>(); @@ -30,6 +37,8 @@ public class MakkahCity { generateCamps(District.ALMANSOOR, (int)getRandom(1600, 1800)); generateCamps(District.ALHIJRA, (int)getRandom(1400, 1600)); + log.fine(String.format("Generated %d Campaigns", listOfCampaigns.size())); + fillBusesToList(); makeStreets();