From ba5ab11cc42d83c4b4abf2ca3a5e6d5977cf45b5 Mon Sep 17 00:00:00 2001 From: orbiter Date: Mon, 27 Jan 2014 21:54:52 +0100 Subject: [PATCH] less logging --- htroot/NetworkPicture.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htroot/NetworkPicture.java b/htroot/NetworkPicture.java index 026b52563..16234c243 100644 --- a/htroot/NetworkPicture.java +++ b/htroot/NetworkPicture.java @@ -39,6 +39,7 @@ import net.yacy.server.serverSwitch; public class NetworkPicture { + private static final ConcurrentLog log = new ConcurrentLog("NetworkPicture"); private static final Semaphore sync = new Semaphore(1, true); private static EncodedImage buffer = null; private static long lastAccessSeconds = 0; @@ -51,8 +52,8 @@ public class NetworkPicture final boolean authorized = sb.adminAuthenticated(header) >= 2; final long timeSeconds = System.currentTimeMillis() / 1000; - if ( buffer != null && !authorized && timeSeconds - lastAccessSeconds < 2 ) { - ConcurrentLog.info("NetworkPicture", "cache hit (1); authorized = " + if (buffer != null && !authorized && timeSeconds - lastAccessSeconds < 2) { + if (log.isFine()) log.fine("cache hit (1); authorized = " + authorized + ", timeSeconds - lastAccessSeconds = " + (timeSeconds - lastAccessSeconds)); @@ -64,8 +65,8 @@ public class NetworkPicture } sync.acquireUninterruptibly(); - if ( buffer != null && !authorized && timeSeconds - lastAccessSeconds < 2 ) { - ConcurrentLog.info("NetworkPicture", "cache hit (2); authorized = " + if (buffer != null && !authorized && timeSeconds - lastAccessSeconds < 2) { + if (log.isFine()) log.fine("cache hit (2); authorized = " + authorized + ", timeSeconds - lastAccessSeconds = " + (timeSeconds - lastAccessSeconds));