diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2015-06-05 11:02:04 +0200 |
---|---|---|
committer | Duarte Meneses <duarte.meneses@sonarsource.com> | 2015-06-05 11:06:00 +0200 |
commit | c77ed68f554d82149b3263e09f32c0eedee5931e (patch) | |
tree | ba27654043288a333c9548d7cc91f2d5463c7db1 /sonar-home | |
parent | d3f83be428f0628ba8489cec4a2c9aab634a206b (diff) | |
download | sonarqube-c77ed68f554d82149b3263e09f32c0eedee5931e.tar.gz sonarqube-c77ed68f554d82149b3263e09f32c0eedee5931e.zip |
improve cache logging
Diffstat (limited to 'sonar-home')
-rw-r--r-- | sonar-home/src/main/java/org/sonar/home/cache/PersistentCache.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sonar-home/src/main/java/org/sonar/home/cache/PersistentCache.java b/sonar-home/src/main/java/org/sonar/home/cache/PersistentCache.java index f5493d3d6a0..a5d88ffcbe9 100644 --- a/sonar-home/src/main/java/org/sonar/home/cache/PersistentCache.java +++ b/sonar-home/src/main/java/org/sonar/home/cache/PersistentCache.java @@ -60,7 +60,7 @@ public class PersistentCache { this.log = log; this.forceUpdate = forceUpdate; - log.info("cache: " + baseDir + " default expiration time (ms): " + defaultDurationToExpireMs); + log.info("cache: " + baseDir + ", default expiration time (ms): " + defaultDurationToExpireMs); if (forceUpdate) { log.debug("cache: forcing update"); @@ -104,20 +104,19 @@ public class PersistentCache { @CheckForNull public synchronized byte[] get(@Nonnull String obj, @Nullable Callable<byte[]> valueLoader) throws Exception { String key = getKey(obj); - log.debug("cache: " + obj + " -> " + key); try (FileLock l = lock()) { if (!forceUpdate) { byte[] cached = getCache(key); if (cached != null) { - log.debug("cache hit for " + obj); + log.debug("cache hit for " + obj + " -> " + key); return cached; } - log.debug("cache miss for " + obj); + log.debug("cache miss for " + obj + " -> " + key); } else { - log.debug("cache force update for " + obj); + log.debug("cache force update for " + obj + " -> " + key); } if (valueLoader != null) { |