Browse Source

Ajout message uniquement si main est en -debug dans cacheReloader

Martin Passard 7 years ago
parent
commit
1018f2cba9
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/main/CacheReloader.java

+ 4 - 1
src/main/CacheReloader.java

@@ -35,7 +35,10 @@ public class CacheReloader implements Runnable {
 			long lastCacheUpdate = c.getLastCacheUpdate().getTime();
 			long now = new Date().getTime();
 			if(lastCacheUpdate+timeout < now) {
-				System.out.println("MISE A JOUR DE DB!!");
+				if(Main.isDebug()) {
+					Date d = new Date();
+					System.out.println(d+" : "+"Mise à jour du cache à partir de DB");
+				}
 				c.reload();
 			}
 			Thread.sleep(timeout*1000);