Changeset a63d2dc for router


Ignore:
Timestamp:
Dec 11, 2018 11:35:45 AM (18 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
fd23b23
Parents:
0f6f8f9
Message:

Transports: Log tweaks

Location:
router/java/src/net/i2p/router/transport
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/transport/TransportImpl.java

    r0f6f8f9 ra63d2dc  
    451451     */
    452452    public void messageReceived(I2NPMessage inMsg, RouterIdentity remoteIdent, Hash remoteIdentHash, long msToReceive, int bytesReceived) {
    453         //if (true)
    454         //    _log.error("(not error) I2NP message received: " + inMsg.getUniqueId() + " after " + msToReceive);
    455 
    456453        int level = Log.INFO;
    457         if (msToReceive > 5000)
    458             level = Log.WARN;
     454        //if (msToReceive > 5000)
     455        //    level = Log.WARN;
    459456        if (_log.shouldLog(level)) {
    460457            StringBuilder buf = new StringBuilder(128);
     
    471468                buf.append("[unknown]");
    472469            }
    473             buf.append(" and forwarding to listener: ");
    474             if (_listener != null)
    475                 buf.append(_listener);
    476 
    477470            _log.log(level, buf.toString());
    478471        }
     
    520513     *  What address are we currently listening to?
    521514     *  Replaces getCurrentAddress()
     515     *
     516     *  Note: An address without a host is considered IPv4.
     517     *
    522518     *  @param ipv6 true for IPv6 only; false for IPv4 only
    523519     *  @return first matching address or null
  • router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java

    r0f6f8f9 ra63d2dc  
    649649        NTCPConnection con = _conByIdent.remove(peer);
    650650        if (con != null) {
     651            if (_log.shouldWarn())
     652                _log.warn("Force disconnect of " + peer, new Exception("I did it"));
    651653            con.close();
    652654        }
  • router/java/src/net/i2p/router/transport/udp/UDPTransport.java

    r0f6f8f9 ra63d2dc  
    26882688        PeerState ps =  _peersByIdent.get(peer);
    26892689        if (ps != null) {
     2690            if (_log.shouldWarn())
     2691                _log.warn("Force disconnect of " + peer, new Exception("I did it"));
    26902692            dropPeer(ps, true, "router");
    26912693        }
Note: See TracChangeset for help on using the changeset viewer.