diff --git a/core/java/src/net/i2p/data/SDSCache.java b/core/java/src/net/i2p/data/SDSCache.java index 8902ea1c2..210809333 100644 --- a/core/java/src/net/i2p/data/SDSCache.java +++ b/core/java/src/net/i2p/data/SDSCache.java @@ -42,7 +42,7 @@ import net.i2p.util.SimpleByteCache; * @author zzz */ public class SDSCache { - private static final Log _log = I2PAppContext.getGlobalContext().logManager().getLog(SDSCache.class); + //private static final Log _log = I2PAppContext.getGlobalContext().logManager().getLog(SDSCache.class); private static final Class[] conArg = new Class[] { byte[].class }; private static final double MIN_FACTOR = 0.25; @@ -79,9 +79,9 @@ public class SDSCache { throw new RuntimeException("SDSCache init error", e); } _statName = "SDSCache." + rvClass.getSimpleName(); - if (_log.shouldLog(Log.DEBUG)) - _log.debug("New SDSCache for " + rvClass + " data size: " + len + - " max: " + size + " max mem: " + (len * size)); + //if (_log.shouldLog(Log.DEBUG)) + // _log.debug("New SDSCache for " + rvClass + " data size: " + len + + // " max: " + size + " max mem: " + (len * size)); I2PAppContext.getGlobalContext().statManager().createRateStat(_statName, "Hit rate", "Router", new long[] { 10*60*1000 }); I2PAppContext.getGlobalContext().addShutdownTask(new Shutdown()); } diff --git a/core/java/src/net/i2p/util/ByteCache.java b/core/java/src/net/i2p/util/ByteCache.java index 2d3eb482d..d4ea7132d 100644 --- a/core/java/src/net/i2p/util/ByteCache.java +++ b/core/java/src/net/i2p/util/ByteCache.java @@ -57,7 +57,7 @@ import net.i2p.data.ByteArray; */ public final class ByteCache { - private static final Log _log = I2PAppContext.getGlobalContext().logManager().getLog(ByteCache.class); + //private static final Log _log = I2PAppContext.getGlobalContext().logManager().getLog(ByteCache.class); private static final Map _caches = new ConcurrentHashMap(16); /** @@ -105,7 +105,7 @@ public final class ByteCache { public static void clearAll() { for (ByteCache bc : _caches.values()) bc.clear(); - _log.warn("WARNING: Low memory, clearing byte caches"); + //_log.warn("WARNING: Low memory, clearing byte caches"); } /** list of available and available entries */ @@ -199,8 +199,8 @@ public final class ByteCache { int toRemove = _available.size() / 2; for (int i = 0; i < toRemove; i++) _available.poll(); - if ( (toRemove > 0) && (_log.shouldLog(Log.DEBUG)) ) - _log.debug("Removing " + toRemove + " cached entries of size " + _entrySize); + //if ( (toRemove > 0) && (_log.shouldLog(Log.DEBUG)) ) + // _log.debug("Removing " + toRemove + " cached entries of size " + _entrySize); } } } diff --git a/core/java/src/net/i2p/util/InternalServerSocket.java b/core/java/src/net/i2p/util/InternalServerSocket.java index 1aa794241..a561a9905 100644 --- a/core/java/src/net/i2p/util/InternalServerSocket.java +++ b/core/java/src/net/i2p/util/InternalServerSocket.java @@ -33,7 +33,7 @@ public class InternalServerSocket extends ServerSocket { private BlockingQueue _acceptQueue; private Integer _port; private boolean _running; - private static Log _log = I2PAppContext.getGlobalContext().logManager().getLog(InternalServerSocket.class); + //private static Log _log = I2PAppContext.getGlobalContext().logManager().getLog(InternalServerSocket.class); public InternalServerSocket(int port) throws IOException { if (port <= 0) @@ -44,14 +44,14 @@ public class InternalServerSocket extends ServerSocket { throw new IOException("Internal port in use: " + port); _running = true; _acceptQueue = new LinkedBlockingQueue(); - if (_log.shouldLog(Log.DEBUG)) - _log.debug("Registered " + _port); + //if (_log.shouldLog(Log.DEBUG)) + // _log.debug("Registered " + _port); } @Override public void close() { - if (_log.shouldLog(Log.DEBUG)) - _log.debug("Closing " + _port); + //if (_log.shouldLog(Log.DEBUG)) + // _log.debug("Closing " + _port); _running = false; _sockets.remove(_port); _acceptQueue.clear(); @@ -65,8 +65,8 @@ public class InternalServerSocket extends ServerSocket { public Socket accept() throws IOException { InternalSocket serverSock = null; while (_running) { - if (_log.shouldLog(Log.DEBUG)) - _log.debug("Accepting " + _port); + //if (_log.shouldLog(Log.DEBUG)) + // _log.debug("Accepting " + _port); try { serverSock = _acceptQueue.take(); } catch (InterruptedException ie) { @@ -74,8 +74,8 @@ public class InternalServerSocket extends ServerSocket { } if (serverSock.getInputStream() == null) // poison throw new IOException("closed"); - if (_log.shouldLog(Log.DEBUG)) - _log.debug("Accepted " + _port); + //if (_log.shouldLog(Log.DEBUG)) + // _log.debug("Accepted " + _port); break; } return serverSock; @@ -123,8 +123,8 @@ public class InternalServerSocket extends ServerSocket { private void queueConnection(InternalSocket sock) throws IOException { if (!_running) throw new IOException("Server closed for port: " + _port); - if (_log.shouldLog(Log.DEBUG)) - _log.debug("Queueing " + _port); + //if (_log.shouldLog(Log.DEBUG)) + // _log.debug("Queueing " + _port); try { _acceptQueue.put(sock); } catch (InterruptedException ie) {}