diff options
author | Jiri Vanek <[email protected]> | 2013-09-25 18:50:18 +0200 |
---|---|---|
committer | Jiri Vanek <[email protected]> | 2013-09-25 18:50:18 +0200 |
commit | 19e74fe5dacd03e0cb5582f840e15262e39fe24f (patch) | |
tree | 38ffc4f47f7641f8d20ba0e0e8a97a97ffb1db64 /netx/net/sourceforge/jnlp/util/TimedHashMap.java | |
parent | fcd5c4c69fc5ea84b04f309eb40e295eab921fd8 (diff) |
Introduced logging bottleneck
Diffstat (limited to 'netx/net/sourceforge/jnlp/util/TimedHashMap.java')
-rw-r--r-- | netx/net/sourceforge/jnlp/util/TimedHashMap.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/netx/net/sourceforge/jnlp/util/TimedHashMap.java b/netx/net/sourceforge/jnlp/util/TimedHashMap.java index 81496ee..4638d94 100644 --- a/netx/net/sourceforge/jnlp/util/TimedHashMap.java +++ b/netx/net/sourceforge/jnlp/util/TimedHashMap.java @@ -37,6 +37,7 @@ exception statement from your version. */ package net.sourceforge.jnlp.util; +import net.sourceforge.jnlp.util.logging.OutputController; import java.util.HashMap; import net.sourceforge.jnlp.runtime.JNLPRuntime; @@ -82,15 +83,11 @@ public class TimedHashMap<K, V> { // Item exists. If it has not expired, renew its access time and return it if (age <= expiry) { - if (JNLPRuntime.isDebug()) { - System.err.println("Returning proxy " + actualMap.get(key) + " from cache for " + key); - } + OutputController.getLogger().log(OutputController.Level.ERROR_DEBUG, "Returning proxy " + actualMap.get(key) + " from cache for " + key); timeStamps.put(key, System.nanoTime()); return actualMap.get(key); } else { - if (JNLPRuntime.isDebug()) { - System.err.println("Proxy cache for " + key + " has expired (age=" + (age * 1e-9) + " seconds)"); - } + OutputController.getLogger().log(OutputController.Level.ERROR_DEBUG, "Proxy cache for " + key + " has expired (age=" + (age * 1e-9) + " seconds)"); } } |