diff options
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/App.java')
-rwxr-xr-x | dozentenmodul/src/main/java/org/openslx/dozmod/App.java | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/App.java b/dozentenmodul/src/main/java/org/openslx/dozmod/App.java index ee3f6e7d..33b6526b 100755 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/App.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/App.java @@ -40,8 +40,6 @@ public class App { // Logger private final static Logger LOGGER = Logger.getLogger(App.class); - private static final String MASTER_SERVER_ADDRESS = "bwlp-masterserver.ruf.uni-freiburg.de"; - public static final int THRIFT_PORT = 9090; public static final int THRIFT_SSL_PORT = THRIFT_PORT + 1; @@ -57,7 +55,7 @@ public class App { private static void setupLogger() { // path to the log file - final String logFilePath = Config.getPath() + File.separator + "bwSuite.log"; + final String logFilePath = Config.getPath() + File.separator + Branding.getServiceName() + ".log"; // check if we had an old log file final File logFile = new File(logFilePath); @@ -122,22 +120,34 @@ public class App { }; BasicConfigurator.configure(ap); - LOGGER.info("Starting logging to: " + logFilePath); - LOGGER.info("bwLehrpool-Suite Version: " + ClientVersion.getLocalRevision()); - LOGGER.info(" " + FormatHelper.longDate(ClientVersion.getLocalRevTimestamp())); - LOGGER.info("os.name: " + System.getProperty("os.name")); - LOGGER.info("java.specification.vendor: " + System.getProperty("java.specification.vendor")); - LOGGER.info("java.specification.name: " + System.getProperty("java.specification.name")); - LOGGER.info("java.specification.version: " + System.getProperty("java.specification.version")); - LOGGER.info("java.version: " + System.getProperty("java.version")); - LOGGER.info("java.vm.version: " + System.getProperty("java.vm.version")); - LOGGER.info("java.runtime.version: " + System.getProperty("java.runtime.version")); + LOGGER.info("Starting logging to: " + logFilePath); + LOGGER.info(Branding.getApplicationName() + " Version: " + ClientVersion.getLocalRevision()); + LOGGER.info(" " + FormatHelper.longDate(ClientVersion.getLocalRevTimestamp())); + LOGGER.info("os.name: " + System.getProperty("os.name")); + LOGGER.info("java.specification.vendor: " + System.getProperty("java.specification.vendor")); + LOGGER.info("java.specification.name: " + System.getProperty("java.specification.name")); + LOGGER.info("java.specification.version: " + System.getProperty("java.specification.version")); + LOGGER.info("java.version: " + System.getProperty("java.version")); + LOGGER.info("java.vm.version: " + System.getProperty("java.vm.version")); + LOGGER.info("java.runtime.version: " + System.getProperty("java.runtime.version")); } public static void main(final String[] args) throws InvocationTargetException, InterruptedException { - if (args.length >= 2 && args[0].equals("--json")) { - writeJsonUpdateFile(args[1]); - return; + if (args.length >= 2) { + if (args[0].equals("--json")) { + writeJsonUpdateFile(args[1]); + return; + } + if (args[0].equals("--dump")) { + Branding.dump(args[1]); + return; + } + } + if (args.length >= 3) { + if (args[0].equals("--pack")) { + Branding.pack(args[1], args[2]); + return; + } } try { Config.init(); @@ -185,7 +195,7 @@ public class App { port = Util.parseInt(args[1], -1); useSsl = Boolean.parseBoolean(args[2]); } else { - host = MASTER_SERVER_ADDRESS; + host = Branding.getMasterServerAddress(); port = THRIFT_SSL_PORT; useSsl = true; } |