From a2579f307f4d7a0476d614ef7b4229f4c4a783db Mon Sep 17 00:00:00 2001 From: Ryan Aird Date: Thu, 1 Oct 2020 14:56:56 -0600 Subject: [PATCH] Added missing file for CLI --- .../main/java/de/bluecolored/bluemap/cli/BlueMapCLI.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/implementations/cli/src/main/java/de/bluecolored/bluemap/cli/BlueMapCLI.java b/implementations/cli/src/main/java/de/bluecolored/bluemap/cli/BlueMapCLI.java index 07024542..bf5dcabc 100644 --- a/implementations/cli/src/main/java/de/bluecolored/bluemap/cli/BlueMapCLI.java +++ b/implementations/cli/src/main/java/de/bluecolored/bluemap/cli/BlueMapCLI.java @@ -227,7 +227,7 @@ public void renderMaps(BlueMapService blueMap, boolean forceRender, boolean forc Logger.global.logInfo("Render finished!"); } - public void startWebserver(BlueMapService blueMap) throws IOException { + public void startWebserver(BlueMapService blueMap, boolean verbose) throws IOException { Logger.global.logInfo("Starting webserver ..."); WebServerConfig config = blueMap.getWebServerConfig(); @@ -237,7 +237,8 @@ public void startWebserver(BlueMapService blueMap) throws IOException { config.getWebserverPort(), config.getWebserverMaxConnections(), config.getWebserverBindAdress(), - requestHandler + requestHandler, + verbose ); webServer.start(); } @@ -283,7 +284,7 @@ public static void main(String[] args) { if (cmd.hasOption("w")) { noActions = false; - cli.startWebserver(blueMap); + cli.startWebserver(blueMap, cmd.hasOption("b")); Thread.sleep(1000); //wait a second to let the webserver start, looks nicer in the log if anything comes after that } @@ -374,6 +375,7 @@ private static Options createOptions() { ); options.addOption("w", "webserver", false, "Starts the web-server, configured in the 'webserver.conf' file"); + options.addOption("b", "verbose", false, "Causes the web-server to log requests to the console"); options.addOption("g", "generate-webapp", false, "Generates the files for the web-app to the folder, configured in the 'render.conf' file (this is done automatically when rendering if the 'index.html' file in the webroot can't be found)"); options.addOption("s", "generate-websettings", false, "Generates the settings for the web-app, using the settings from the 'render.conf' file (this is done automatically when rendering)");