From a577e8a4efc50e10da2efe472bba60ad8e760886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Heredero?= Date: Wed, 17 May 2023 20:53:14 +0200 Subject: [PATCH] add DEBUG_MODE --- src/main/java/ch/hevs/isi/utils/Utility.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/ch/hevs/isi/utils/Utility.java b/src/main/java/ch/hevs/isi/utils/Utility.java index 9edfd89..62b7cf4 100644 --- a/src/main/java/ch/hevs/isi/utils/Utility.java +++ b/src/main/java/ch/hevs/isi/utils/Utility.java @@ -21,6 +21,7 @@ import java.util.*; public class Utility { /** Default size for the TCP input stream */ public static final int TCP_BUFFER_SIZE = 4096; + public static final boolean DEBUG_MODE = false; /** Object to get some random values... */ public static Random rnd = new Random(1); @@ -419,4 +420,8 @@ public class Utility { System.out.println(logMsg); } } + + public static void pDebug(String msg) { + if(DEBUG_MODE) System.out.println(msg); + } }