From c3b3c491051c08e035593a25850e537168bb1db9 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Wed, 18 Dec 2013 15:41:28 +0100 Subject: JNLPRuntime.config changed to proper singleton. --- .../net/sourceforge/jnlp/util/logging/LogConfig.java | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'netx/net/sourceforge/jnlp/util/logging/LogConfig.java') diff --git a/netx/net/sourceforge/jnlp/util/logging/LogConfig.java b/netx/net/sourceforge/jnlp/util/logging/LogConfig.java index 72941f3..c02043c 100644 --- a/netx/net/sourceforge/jnlp/util/logging/LogConfig.java +++ b/netx/net/sourceforge/jnlp/util/logging/LogConfig.java @@ -55,19 +55,11 @@ public class LogConfig { private boolean logToFile; private boolean logToStreams; private boolean logToSysLog; - private DeploymentConfiguration config; private static LogConfig logConfig; public LogConfig() { - try { - config = JNLPRuntime.getConfiguration(); - if (config.getRaw().isEmpty()){ - config = new DeploymentConfiguration();//JNLPRuntime.getConfiguration() cannotbe loaded time - config.load(); //read one prior - //todo fix JNLPRuntime.getConfiguration(); to be correct singleton - not easy task! - } - + DeploymentConfiguration config = JNLPRuntime.getConfiguration(); // Check whether logging and tracing is enabled. enableLogging = Boolean.parseBoolean(config.getProperty(DeploymentConfiguration.KEY_ENABLE_LOGGING)); //enagle disable headers @@ -87,9 +79,6 @@ public class LogConfig { enableLogging = false; } } - } catch (ConfigurationException e) { - throw new RuntimeException(e); - } } public static LogConfig getLogConfig() { @@ -162,11 +151,4 @@ public class LogConfig { return JavaConsole.isEnabled(); } - /* - * logging stuff may be interested in used config - */ - public DeploymentConfiguration getConfig() { - return config; - } - } -- cgit v1.2.3