Changeset e99b206


Ignore:
Timestamp:
Mar 5, 2012 12:37:48 AM (8 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
d85ae48
Parents:
57f4ede
Message:

log tweaks

File:
1 edited

Legend:

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

    r57f4ede re99b206  
    478478        boolean inboundRecent = _lastInboundReceivedOn + ALLOW_IP_CHANGE_INTERVAL > System.currentTimeMillis();
    479479        if (_log.shouldLog(Log.INFO))
    480             _log.info("External address received: " + RemoteHostId.toString(ourIP) + ":" + ourPort + " from "
     480            _log.info("External address received: " + Addresses.toString(ourIP, ourPort) + " from "
    481481                      + from.toBase64() + ", isValid? " + isValid + ", explicitSpecified? " + explicitSpecified
    482482                      + ", receivedInboundRecent? " + inboundRecent + " status " + _reachabilityStatus);
     
    492492            if (_log.shouldLog(Log.ERROR))
    493493                _log.error("The router " + from.toBase64() + " told us we have an invalid IP - "
    494                            + RemoteHostId.toString(ourIP) + " port " +  ourPort + ".  Lets throw tomatoes at them");
     494                           + Addresses.toString(ourIP, ourPort) + ".  Lets throw tomatoes at them");
    495495            markUnreachable(from);
    496496            //_context.shitlist().shitlistRouter(from, "They said we had an invalid IP", STYLE);
     
    507507            _lastOurIP = ourIP;
    508508            _lastOurPort = ourPort;
    509             if (_log.shouldLog(Log.WARN))
    510                 _log.warn("The router " + from.toBase64() + " told us we have a new IP - "
    511                            + RemoteHostId.toString(ourIP) + " port " +  ourPort + ".  Wait until somebody else tells us the same thing.");
     509            if (_log.shouldLog(Log.INFO))
     510                _log.info("The router " + from.toBase64() + " told us we have a new IP - "
     511                           + Addresses.toString(ourIP, ourPort) + ".  Wait until somebody else tells us the same thing.");
    512512        } else {
    513             if (_log.shouldLog(Log.WARN))
    514                 _log.warn(from.toBase64() + " and " + _lastFrom.toBase64() + " agree we have a new IP - "
    515                            + RemoteHostId.toString(ourIP) + " port " +  ourPort + ".  Changing address.");
     513            if (_log.shouldLog(Log.INFO))
     514                _log.info(from.toBase64() + " and " + _lastFrom.toBase64() + " agree we have a new IP - "
     515                           + Addresses.toString(ourIP, ourPort) + ".  Changing address.");
    516516            _lastFrom = from;
    517517            _lastOurIP = ourIP;
     
    531531        boolean fireTest = false;
    532532
    533         if (_log.shouldLog(Log.WARN))
    534             _log.warn("Change address? status = " + _reachabilityStatus +
     533        if (_log.shouldLog(Log.INFO))
     534            _log.info("Change address? status = " + _reachabilityStatus +
    535535                      " diff = " + (_context.clock().now() - _reachabilityStatusLastUpdated) +
    536536                      " old = " + _externalListenHost + ':' + _externalListenPort +
    537                       " new = " + RemoteHostId.toString(ourIP) + ':' + ourPort);
     537                      " new = " + Addresses.toString(ourIP, ourPort));
    538538
    539539            synchronized (this) {
     
    545545                    //     (_context.clock().now() - _reachabilityStatusLastUpdated > 2*TEST_FREQUENCY) ) {
    546546                        // they told us something different and our tests are either old or failing
    547                         if (_log.shouldLog(Log.WARN))
    548                             _log.warn("Trying to change our external address...");
    549547                        try {
    550548                            _externalListenHost = InetAddress.getByAddress(ourIP);
     
    552550                            if (ourPort >= MIN_EXTERNAL_PORT && !fixedPort)
    553551                                _externalListenPort = ourPort;
     552                            if (_log.shouldLog(Log.WARN))
     553                                _log.warn("Trying to change our external address to " +
     554                                          Addresses.toString(ourIP, _externalListenPort));
    554555                            if (_externalListenPort > 0)  {
    555556                                rebuildExternalAddress();
     
    560561                            _externalListenHost = null;
    561562                            if (_log.shouldLog(Log.WARN))
    562                                 _log.warn("Error trying to change our external address", uhe);
     563                                _log.warn("Error trying to change our external address to " +
     564                                          Addresses.toString(ourIP, ourPort), uhe);
    563565                        }
    564566                    //} else {
Note: See TracChangeset for help on using the changeset viewer.