Added debugLogging launch argument
This commit is contained in:
parent
20251f9543
commit
1a0aba204c
2 changed files with 5 additions and 1 deletions
|
@ -18,6 +18,7 @@ public class Main {
|
|||
public static boolean FORCE_UPLOAD_MEMBERS;
|
||||
public static boolean FORCE_UPLOAD_SPEECHES;
|
||||
public static boolean ONLY_RUN_WEB;
|
||||
public static boolean DEBUG_LOGGING;
|
||||
private static final FileObjectFactory xmlFactory = FileObjectFactory.getFactory();
|
||||
private static final MongoObjectFactory mongoFactory = MongoObjectFactory.getFactory();
|
||||
|
||||
|
@ -26,6 +27,7 @@ public class Main {
|
|||
FORCE_UPLOAD_MEMBERS = Arrays.asList(args).contains("forceUploadMembers");
|
||||
FORCE_UPLOAD_SPEECHES = Arrays.asList(args).contains("forceUploadSpeeches");
|
||||
ONLY_RUN_WEB = Arrays.asList(args).contains("onlyRunWeb");
|
||||
DEBUG_LOGGING = Arrays.asList(args).contains("debugLogging");
|
||||
|
||||
System.out.println("Starting Multimodal Parliament Explorer...");
|
||||
System.out.println("--------------------------------------------o");
|
||||
|
@ -34,6 +36,7 @@ public class Main {
|
|||
System.out.println(" - Force Upload Members: " + FORCE_UPLOAD_MEMBERS);
|
||||
System.out.println(" - Force Upload Speeches: " + FORCE_UPLOAD_SPEECHES);
|
||||
System.out.println(" - Only Run javalin Web Server: " + ONLY_RUN_WEB);
|
||||
System.out.println(" - Debug Logging: " + DEBUG_LOGGING);
|
||||
System.out.println("--------------------------------------------o");
|
||||
|
||||
if (ONLY_RUN_WEB) {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package org.texttechnologylab.project.gruppe_05_1.util;
|
||||
|
||||
import static org.texttechnologylab.project.gruppe_05_1.Main.DEBUG_LOGGING;
|
||||
|
||||
public class Logger {
|
||||
private static final boolean DEBUG_LOGGING = false;
|
||||
// info, warn, error with message and colors and datetime
|
||||
public static void info(String message) {
|
||||
System.out.println("\u001B[32m" + java.time.LocalTime.now() + " INFO: " + message + "\u001B[0m");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue