Changeset fdd0d6c


Ignore:
Timestamp:
Jul 9, 2011 2:57:41 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
94af227b
Parents:
5402bd0
Message:

remove static log refs

Location:
core/java/src/net/i2p
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/data/SDSCache.java

    r5402bd0 rfdd0d6c  
    4343 */
    4444public class SDSCache<V extends SimpleDataStructure> {
    45     private static final Log _log = I2PAppContext.getGlobalContext().logManager().getLog(SDSCache.class);
     45    //private static final Log _log = I2PAppContext.getGlobalContext().logManager().getLog(SDSCache.class);
    4646
    4747    private static final Class[] conArg = new Class[] { byte[].class };
     
    8080        }
    8181        _statName = "SDSCache." + rvClass.getSimpleName();
    82         if (_log.shouldLog(Log.DEBUG))
    83             _log.debug("New SDSCache for " + rvClass + " data size: " + len +
    84                        " max: " + size + " max mem: " + (len * size));
     82        //if (_log.shouldLog(Log.DEBUG))
     83        //    _log.debug("New SDSCache for " + rvClass + " data size: " + len +
     84        //               " max: " + size + " max mem: " + (len * size));
    8585        I2PAppContext.getGlobalContext().statManager().createRateStat(_statName, "Hit rate", "Router", new long[] { 10*60*1000 });
    8686        I2PAppContext.getGlobalContext().addShutdownTask(new Shutdown());
  • core/java/src/net/i2p/util/ByteCache.java

    r5402bd0 rfdd0d6c  
    5858public final class ByteCache {
    5959
    60     private static final Log _log = I2PAppContext.getGlobalContext().logManager().getLog(ByteCache.class);
     60    //private static final Log _log = I2PAppContext.getGlobalContext().logManager().getLog(ByteCache.class);
    6161    private static final Map<Integer, ByteCache> _caches = new ConcurrentHashMap(16);
    6262
     
    106106        for (ByteCache bc : _caches.values())
    107107            bc.clear();
    108         _log.warn("WARNING: Low memory, clearing byte caches");
     108        //_log.warn("WARNING: Low memory, clearing byte caches");
    109109    }
    110110
     
    200200                    for (int i = 0; i < toRemove; i++)
    201201                        _available.poll();
    202                     if ( (toRemove > 0) && (_log.shouldLog(Log.DEBUG)) )
    203                         _log.debug("Removing " + toRemove + " cached entries of size " + _entrySize);
     202                    //if ( (toRemove > 0) && (_log.shouldLog(Log.DEBUG)) )
     203                    //    _log.debug("Removing " + toRemove + " cached entries of size " + _entrySize);
    204204            }
    205205        }
  • core/java/src/net/i2p/util/InternalServerSocket.java

    r5402bd0 rfdd0d6c  
    3434    private Integer _port;
    3535    private boolean _running;
    36     private static Log _log = I2PAppContext.getGlobalContext().logManager().getLog(InternalServerSocket.class);
     36    //private static Log _log = I2PAppContext.getGlobalContext().logManager().getLog(InternalServerSocket.class);
    3737
    3838    public InternalServerSocket(int port) throws IOException {
     
    4545         _running = true;
    4646         _acceptQueue = new LinkedBlockingQueue();
    47          if (_log.shouldLog(Log.DEBUG))
    48              _log.debug("Registered " + _port);
     47         //if (_log.shouldLog(Log.DEBUG))
     48         //    _log.debug("Registered " + _port);
    4949    }
    5050
    5151    @Override
    5252    public void close() {
    53          if (_log.shouldLog(Log.DEBUG))
    54             _log.debug("Closing " + _port);
     53         //if (_log.shouldLog(Log.DEBUG))
     54         //   _log.debug("Closing " + _port);
    5555        _running = false;
    5656        _sockets.remove(_port);
     
    6666        InternalSocket serverSock = null;
    6767        while (_running) {
    68             if (_log.shouldLog(Log.DEBUG))
    69                 _log.debug("Accepting " + _port);
     68            //if (_log.shouldLog(Log.DEBUG))
     69            //    _log.debug("Accepting " + _port);
    7070            try {
    7171                serverSock = _acceptQueue.take();
     
    7575            if (serverSock.getInputStream() == null) // poison
    7676                throw new IOException("closed");
    77             if (_log.shouldLog(Log.DEBUG))
    78                 _log.debug("Accepted " + _port);
     77            //if (_log.shouldLog(Log.DEBUG))
     78            //    _log.debug("Accepted " + _port);
    7979            break;
    8080        }
     
    124124        if (!_running)
    125125             throw new IOException("Server closed for port: " + _port);
    126         if (_log.shouldLog(Log.DEBUG))
    127             _log.debug("Queueing " + _port);
     126        //if (_log.shouldLog(Log.DEBUG))
     127        //    _log.debug("Queueing " + _port);
    128128        try {
    129129            _acceptQueue.put(sock);
Note: See TracChangeset for help on using the changeset viewer.