Changeset ede1b19


Ignore:
Timestamp:
Feb 28, 2012 3:58:02 PM (10 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
2bc70b5
Parents:
17f7264
Message:

remove static logs

Location:
router/java/src/net/i2p/router
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/client/ClientManagerFacadeImpl.java

    r17f7264 rede1b19  
    3737 */
    3838public class ClientManagerFacadeImpl extends ClientManagerFacade implements InternalClientManager {
    39     private final static Log _log = new Log(ClientManagerFacadeImpl.class);
     39    private final Log _log;
    4040    private ClientManager _manager;
    4141    private RouterContext _context;
     
    4949    public ClientManagerFacadeImpl(RouterContext context) {
    5050        _context = context;
    51         _log.debug("Client manager facade created");
     51        _log = _context.logManager().getLog(ClientManagerFacadeImpl.class);
     52        //_log.debug("Client manager facade created");
    5253    }
    5354   
  • router/java/src/net/i2p/router/networkdb/kademlia/LocalHash.java

    r17f7264 rede1b19  
    2828 */
    2929class LocalHash extends Hash {
    30     private final static Log _log = new Log(LocalHash.class);
     30    //private final static Log _log = new Log(LocalHash.class);
    3131    private /* FIXME final FIXME */ Map<Hash, byte[]> _xorCache;
    3232
     
    8787                cached = _xorCache.size();
    8888            }
     89          /****
    8990            if (_log.shouldLog(Log.DEBUG)) {
    9091                // explicit buffer, since the compiler can't guess how long it'll be
     
    9596                _log.debug(buf.toString(), new Exception());
    9697            }
     98          ****/
    9799        } else {
     100          /****
    98101            if (_log.shouldLog(Log.DEBUG)) {
    99102                // explicit buffer, since the compiler can't guess how long it'll be
     
    104107                _log.debug(buf.toString());
    105108            }
     109          ****/
    106110        }
    107111        return distance;
  • router/java/src/net/i2p/router/networkdb/kademlia/MessageWrapper.java

    r17f7264 rede1b19  
    2828class MessageWrapper {
    2929
    30     private static final Log _log = RouterContext.getGlobalContext().logManager().getLog(MessageWrapper.class);
     30    //private static final Log _log = RouterContext.getGlobalContext().logManager().getLog(MessageWrapper.class);
    3131
    3232    private static final int NETDB_TAGS_TO_DELIVER = 6;
     
    7272        if (!sentTags.isEmpty())
    7373            tsh = skm.tagsDelivered(sentTo, sentKey, sentTags);
    74         if (_log.shouldLog(Log.DEBUG))
    75             _log.debug("Sent to: " + to.getIdentity().getHash() + " with key: " + sentKey + " and tags: " + sentTags.size());
     74        //if (_log.shouldLog(Log.DEBUG))
     75        //    _log.debug("Sent to: " + to.getIdentity().getHash() + " with key: " + sentKey + " and tags: " + sentTags.size());
    7676        return new WrappedMessage(msg, skm, sentTo, sentKey, tsh);
    7777    }
     
    104104            if (this.tsh != null) {
    105105                this.skm.tagsAcked(this.sentTo, this.sessionKey, this.tsh);
    106                 if (_log.shouldLog(Log.DEBUG))
    107                     _log.debug("Tags acked for key: " + this.sessionKey);
     106                //if (_log.shouldLog(Log.DEBUG))
     107                //    _log.debug("Tags acked for key: " + this.sessionKey);
    108108            }
    109109        }
     
    113113            if (this.tsh != null) {
    114114                this.skm.failTags(this.sentTo, this.sessionKey, this.tsh);
    115                 if (_log.shouldLog(Log.DEBUG))
    116                     _log.debug("Tags NOT acked for key: " + this.sessionKey);
     115                //if (_log.shouldLog(Log.DEBUG))
     116                //    _log.debug("Tags NOT acked for key: " + this.sessionKey);
    117117            }
    118118        }
  • router/java/src/net/i2p/router/transport/ntcp/NTCPAddress.java

    r17f7264 rede1b19  
    1212import java.util.Properties;
    1313
     14import net.i2p.I2PAppContext;
    1415import net.i2p.data.DataHelper;
    1516import net.i2p.data.RouterAddress;
     
    2122 */
    2223public class NTCPAddress {
    23     private final static Log _log = new Log(NTCPAddress.class);
    2424    private int _port;
    2525    private String _host;
     
    6969                    _port = Integer.parseInt(port.trim());
    7070                } catch (NumberFormatException nfe) {
    71                     _log.error("Invalid port [" + port + "]", nfe);
     71                    Log log = I2PAppContext.getGlobalContext().logManager().getLog(NTCPAddress.class);
     72                    log.error("Invalid port [" + port + "]", nfe);
    7273                    _port = -1;
    7374                }
     
    120121            return TransportImpl.isPubliclyRoutable(quad);
    121122        } catch (Throwable t) {
    122             if (_log.shouldLog(Log.WARN))
    123                 _log.warn("Error checking routability", t);
     123            //if (_log.shouldLog(Log.WARN))
     124            //    _log.warn("Error checking routability", t);
    124125            return false;
    125126        }
  • router/java/src/net/i2p/router/transport/udp/UDPPacket.java

    r17f7264 rede1b19  
    1919class UDPPacket {
    2020    private I2PAppContext _context;
    21     private static Log _log;
    2221    private final DatagramPacket _packet;
    2322    private volatile short _priority;
     
    4948        else
    5049            _packetCache = null;
    51         _log = I2PAppContext.getGlobalContext().logManager().getLog(UDPPacket.class);
    5250    }
    5351   
     
    215213             */
    216214        } else {
    217             if (_log.shouldLog(Log.WARN))
    218                 _log.warn("Payload length is " + payloadLength);
     215            //if (_log.shouldLog(Log.WARN))
     216            //    _log.warn("Payload length is " + payloadLength);
    219217        }
    220218       
     
    322320        if (CACHE) return;
    323321        if (_released) {
    324             _log.log(Log.CRIT, "Already released.  current stack trace is:", new Exception());
    325             _log.log(Log.CRIT, "Released by: ", _releasedBy);
    326             _log.log(Log.CRIT, "Acquired by: ", _acquiredBy);
     322            Log log = I2PAppContext.getGlobalContext().logManager().getLog(UDPPacket.class);
     323            log.log(Log.CRIT, "Already released.  current stack trace is:", new Exception());
     324            log.log(Log.CRIT, "Released by: ", _releasedBy);
     325            log.log(Log.CRIT, "Acquired by: ", _acquiredBy);
    327326        }
    328327    }
Note: See TracChangeset for help on using the changeset viewer.