aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java
diff options
context:
space:
mode:
authorJiri Vanek <[email protected]>2013-09-25 18:50:18 +0200
committerJiri Vanek <[email protected]>2013-09-25 18:50:18 +0200
commit19e74fe5dacd03e0cb5582f840e15262e39fe24f (patch)
tree38ffc4f47f7641f8d20ba0e0e8a97a97ffb1db64 /netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java
parentfcd5c4c69fc5ea84b04f309eb40e295eab921fd8 (diff)
Introduced logging bottleneck
Diffstat (limited to 'netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java')
-rw-r--r--netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java b/netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java
index 45c8067..c873c4d 100644
--- a/netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java
+++ b/netx/net/sourceforge/jnlp/cache/CacheLRUWrapper.java
@@ -53,6 +53,7 @@ import java.util.Map.Entry;
import net.sourceforge.jnlp.config.DeploymentConfiguration;
import net.sourceforge.jnlp.runtime.JNLPRuntime;
import net.sourceforge.jnlp.util.FileUtils;
+import net.sourceforge.jnlp.util.logging.OutputController;
import net.sourceforge.jnlp.util.PropertiesFile;
/**
@@ -90,7 +91,7 @@ public enum CacheLRUWrapper {
FileUtils.createParentDir(f);
FileUtils.createRestrictedFile(f, true);
} catch (IOException e) {
- e.printStackTrace();
+ OutputController.getLogger().log(OutputController.Level.ERROR_ALL, e);
}
}
}
@@ -114,12 +115,10 @@ public enum CacheLRUWrapper {
* clean up possibly corrupted entries
*/
if (loaded && checkData()) {
- if (JNLPRuntime.isDebug()) {
- new LruCacheException().printStackTrace();
- }
- System.out.println(R("CFakeCache"));
+ OutputController.getLogger().log(new LruCacheException());
+ OutputController.getLogger().log(OutputController.Level.MESSAGE_ALL, R("CFakeCache"));
store();
- System.out.println(R("CFakedCache"));
+ OutputController.getLogger().log(OutputController.Level.MESSAGE_ALL, R("CFakedCache"));
}
}
@@ -246,7 +245,7 @@ public enum CacheLRUWrapper {
fl = FileUtils.getFileLock(cacheOrder.getStoreFile().getPath(), false, true);
} catch (OverlappingFileLockException e) { // if overlap we just increase the count.
} catch (Exception e) { // We didn't get a lock..
- e.printStackTrace();
+ OutputController.getLogger().log(e);
}
if (fl != null) lockCount++;
}
@@ -264,7 +263,7 @@ public enum CacheLRUWrapper {
fl = null;
}
} catch (IOException e) {
- e.printStackTrace();
+ OutputController.getLogger().log(e);
}
}
}