diff options
author | Jiri Vanek <[email protected]> | 2013-12-18 15:41:28 +0100 |
---|---|---|
committer | Jiri Vanek <[email protected]> | 2013-12-18 15:41:28 +0100 |
commit | c3b3c491051c08e035593a25850e537168bb1db9 (patch) | |
tree | 589d008ee200fd0c7e73d4bdd29789324ad66c27 /netx/net/sourceforge/jnlp/util/logging/LogConfig.java | |
parent | d91bf9ee53eebc7028f4143e03881ee350e4ebef (diff) |
JNLPRuntime.config changed to proper singleton.
Diffstat (limited to 'netx/net/sourceforge/jnlp/util/logging/LogConfig.java')
-rw-r--r-- | netx/net/sourceforge/jnlp/util/logging/LogConfig.java | 20 |
1 files changed, 1 insertions, 19 deletions
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; - } - } |