I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit fcb835da authored by zzz's avatar zzz
Browse files

log tweaks for b32

parent 7493134f
No related branches found
No related tags found
No related merge requests found
...@@ -297,7 +297,7 @@ class ClientManager { ...@@ -297,7 +297,7 @@ class ClientManager {
*/ */
public int destinationEstablished(ClientConnectionRunner runner, Destination dest) { public int destinationEstablished(ClientConnectionRunner runner, Destination dest) {
if (_log.shouldLog(Log.DEBUG)) if (_log.shouldLog(Log.DEBUG))
_log.debug("DestinationEstablished called for destination " + dest.calculateHash().toBase64()); _log.debug("DestinationEstablished called for destination " + dest.toBase32());
synchronized (_pendingRunners) { synchronized (_pendingRunners) {
_pendingRunners.remove(runner); _pendingRunners.remove(runner);
...@@ -321,9 +321,9 @@ class ClientManager { ...@@ -321,9 +321,9 @@ class ClientManager {
} }
} }
if (rv == SessionStatusMessage.STATUS_INVALID) { if (rv == SessionStatusMessage.STATUS_INVALID) {
_log.log(Log.CRIT, "Client attempted to register duplicate destination " + dest.calculateHash().toBase64()); _log.log(Log.CRIT, "Client attempted to register duplicate destination " + dest.toBase32());
} else if (rv == SessionStatusMessage.STATUS_REFUSED) { } else if (rv == SessionStatusMessage.STATUS_REFUSED) {
_log.error("Max sessions exceeded " + dest.calculateHash().toBase64()); _log.error("Max sessions exceeded " + dest.toBase32());
} }
return rv; return rv;
} }
...@@ -447,7 +447,7 @@ class ClientManager { ...@@ -447,7 +447,7 @@ class ClientManager {
if (runner == null) { if (runner == null) {
if (_log.shouldLog(Log.WARN)) if (_log.shouldLog(Log.WARN))
_log.warn("Cannot request the lease set, as we can't find a client runner for " _log.warn("Cannot request the lease set, as we can't find a client runner for "
+ dest.calculateHash().toBase64() + ". disconnected?"); + dest.toBase32() + ". disconnected?");
_ctx.jobQueue().addJob(onFailedJob); _ctx.jobQueue().addJob(onFailedJob);
} else { } else {
runner.requestLeaseSet(dest.calculateHash(), set, timeout, onCreateJob, onFailedJob); runner.requestLeaseSet(dest.calculateHash(), set, timeout, onCreateJob, onFailedJob);
......
...@@ -96,7 +96,7 @@ public class ClientManagerFacadeImpl extends ClientManagerFacade implements Inte ...@@ -96,7 +96,7 @@ public class ClientManagerFacadeImpl extends ClientManagerFacade implements Inte
long howLongAgo = _context.clock().now() - ls.getEarliestLeaseDate(); long howLongAgo = _context.clock().now() - ls.getEarliestLeaseDate();
if (howLongAgo > MAX_TIME_TO_REBUILD) { if (howLongAgo > MAX_TIME_TO_REBUILD) {
if (_log.shouldLog(Log.ERROR)) if (_log.shouldLog(Log.ERROR))
_log.error("Client " + dest.calculateHash().toBase64().substring(0,6) _log.error("Client " + dest.toBase32()
+ " has a leaseSet that expired " + DataHelper.formatDuration(howLongAgo) + " ago"); + " has a leaseSet that expired " + DataHelper.formatDuration(howLongAgo) + " ago");
lively = false; lively = false;
} }
......
...@@ -128,7 +128,7 @@ public class TunnelPoolManager implements TunnelManagerFacade { ...@@ -128,7 +128,7 @@ public class TunnelPoolManager implements TunnelManagerFacade {
return pool.selectTunnel(); return pool.selectTunnel();
} }
if (_log.shouldLog(Log.ERROR)) if (_log.shouldLog(Log.ERROR))
_log.error("Want the inbound tunnel for " + destination.calculateHash() + _log.error("Want the inbound tunnel for " + destination.toBase32() +
" but there isn't a pool?"); " but there isn't a pool?");
return null; return null;
} }
...@@ -204,7 +204,7 @@ public class TunnelPoolManager implements TunnelManagerFacade { ...@@ -204,7 +204,7 @@ public class TunnelPoolManager implements TunnelManagerFacade {
return pool.selectTunnel(closestTo); return pool.selectTunnel(closestTo);
} }
if (_log.shouldLog(Log.ERROR)) if (_log.shouldLog(Log.ERROR))
_log.error("Want the inbound tunnel for " + destination.calculateHash() + _log.error("Want the inbound tunnel for " + destination.toBase32() +
" but there isn't a pool?"); " but there isn't a pool?");
return null; return null;
} }
...@@ -403,7 +403,7 @@ public class TunnelPoolManager implements TunnelManagerFacade { ...@@ -403,7 +403,7 @@ public class TunnelPoolManager implements TunnelManagerFacade {
public void buildTunnels(Destination client, ClientTunnelSettings settings) { public void buildTunnels(Destination client, ClientTunnelSettings settings) {
Hash dest = client.calculateHash(); Hash dest = client.calculateHash();
if (_log.shouldLog(Log.DEBUG)) if (_log.shouldLog(Log.DEBUG))
_log.debug("Building tunnels for the client " + dest + ": " + settings); _log.debug("Building tunnels for the client " + client.toBase32() + ": " + settings);
TunnelPool inbound = null; TunnelPool inbound = null;
TunnelPool outbound = null; TunnelPool outbound = null;
...@@ -456,7 +456,7 @@ public class TunnelPoolManager implements TunnelManagerFacade { ...@@ -456,7 +456,7 @@ public class TunnelPoolManager implements TunnelManagerFacade {
TunnelPool outbound = _clientOutboundPools.get(h); TunnelPool outbound = _clientOutboundPools.get(h);
if (inbound != null || outbound != null) { if (inbound != null || outbound != null) {
if (_log.shouldLog(Log.WARN)) if (_log.shouldLog(Log.WARN))
_log.warn("already have alias " + dest); _log.warn("already have alias " + dest.toBase32());
return false; return false;
} }
TunnelPool eInbound = _clientInboundPools.get(e); TunnelPool eInbound = _clientInboundPools.get(e);
...@@ -480,7 +480,7 @@ public class TunnelPoolManager implements TunnelManagerFacade { ...@@ -480,7 +480,7 @@ public class TunnelPoolManager implements TunnelManagerFacade {
outbound.startup(); outbound.startup();
} }
if (_log.shouldLog(Log.WARN)) if (_log.shouldLog(Log.WARN))
_log.warn("Added " + h + " as alias for " + e + " with settings " + settings); _log.warn("Added " + dest.toBase32() + " as alias for " + existingClient.toBase32() + " with settings " + settings);
return true; return true;
} }
...@@ -538,11 +538,11 @@ public class TunnelPoolManager implements TunnelManagerFacade { ...@@ -538,11 +538,11 @@ public class TunnelPoolManager implements TunnelManagerFacade {
public synchronized void removeTunnels(Hash destination) { public synchronized void removeTunnels(Hash destination) {
if (destination == null) return; if (destination == null) return;
if (_log.shouldLog(Log.DEBUG)) if (_log.shouldLog(Log.DEBUG))
_log.debug("Removing tunnels for the client " + destination); _log.debug("Removing tunnels for the client " + destination.toBase32());
if (_context.clientManager().isLocal(destination)) { if (_context.clientManager().isLocal(destination)) {
// race with buildTunnels() on restart of a client // race with buildTunnels() on restart of a client
if (_log.shouldLog(Log.WARN)) if (_log.shouldLog(Log.WARN))
_log.warn("Not removing pool still registered with client manager: " + destination.toBase64(), new Exception("i did it")); _log.warn("Not removing pool still registered with client manager: " + destination.toBase32(), new Exception("i did it"));
return; return;
} }
TunnelPool inbound = _clientInboundPools.remove(destination); TunnelPool inbound = _clientInboundPools.remove(destination);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment