log tweaks

This commit is contained in:
zzz
2013-05-21 13:39:43 +00:00
parent 8b1ab4b8d2
commit 2f39574123

View File

@ -160,7 +160,7 @@ abstract class BuildRequestor {
if (cfg.isInbound()) { if (cfg.isInbound()) {
if (log.shouldLog(Log.INFO)) if (log.shouldLog(Log.INFO))
log.info("Sending the tunnel build request " + msg.getUniqueId() + " out the tunnel " + pairedTunnel + " to " log.info("Sending the tunnel build request " + msg.getUniqueId() + " out the tunnel " + pairedTunnel + " to "
+ cfg.getPeer(0).toBase64() + " for " + cfg + " waiting for the reply of " + cfg.getPeer(0) + " for " + cfg + " waiting for the reply of "
+ cfg.getReplyMessageId()); + cfg.getReplyMessageId());
// send it out a tunnel targetting the first hop // send it out a tunnel targetting the first hop
// TODO - would be nice to have a TunnelBuildFirstHopFailJob queued if the // TODO - would be nice to have a TunnelBuildFirstHopFailJob queued if the
@ -168,7 +168,7 @@ abstract class BuildRequestor {
ctx.tunnelDispatcher().dispatchOutbound(msg, pairedTunnel.getSendTunnelId(0), cfg.getPeer(0)); ctx.tunnelDispatcher().dispatchOutbound(msg, pairedTunnel.getSendTunnelId(0), cfg.getPeer(0));
} else { } else {
if (log.shouldLog(Log.INFO)) if (log.shouldLog(Log.INFO))
log.info("Sending the tunnel build request directly to " + cfg.getPeer(1).toBase64() log.info("Sending the tunnel build request directly to " + cfg.getPeer(1)
+ " for " + cfg + " waiting for the reply of " + cfg.getReplyMessageId() + " for " + cfg + " waiting for the reply of " + cfg.getReplyMessageId()
+ " with msgId=" + msg.getUniqueId()); + " with msgId=" + msg.getUniqueId());
// send it directly to the first hop // send it directly to the first hop
@ -183,8 +183,8 @@ abstract class BuildRequestor {
outMsg.setPriority(PRIORITY); outMsg.setPriority(PRIORITY);
RouterInfo peer = ctx.netDb().lookupRouterInfoLocally(cfg.getPeer(1)); RouterInfo peer = ctx.netDb().lookupRouterInfoLocally(cfg.getPeer(1));
if (peer == null) { if (peer == null) {
if (log.shouldLog(Log.ERROR)) if (log.shouldLog(Log.WARN))
log.error("Could not find the next hop to send the outbound request to: " + cfg); log.warn("Could not find the next hop to send the outbound request to: " + cfg);
exec.buildComplete(cfg, pool); exec.buildComplete(cfg, pool);
return; return;
} }
@ -300,7 +300,7 @@ abstract class BuildRequestor {
if (peerInfo == null) { if (peerInfo == null) {
if (log.shouldLog(Log.WARN)) if (log.shouldLog(Log.WARN))
log.warn("Peer selected for hop " + i + "/" + hop + " was not found locally: " log.warn("Peer selected for hop " + i + "/" + hop + " was not found locally: "
+ peer.toBase64() + " for " + cfg); + peer + " for " + cfg);
return null; return null;
} else { } else {
key = peerInfo.getIdentity().getPublicKey(); key = peerInfo.getIdentity().getPublicKey();
@ -343,9 +343,9 @@ abstract class BuildRequestor {
* Can't do this for inbound tunnels since the msg goes out an expl. tunnel. * Can't do this for inbound tunnels since the msg goes out an expl. tunnel.
*/ */
private static class TunnelBuildFirstHopFailJob extends JobImpl { private static class TunnelBuildFirstHopFailJob extends JobImpl {
final TunnelPool _pool; private final TunnelPool _pool;
final PooledTunnelCreatorConfig _cfg; private final PooledTunnelCreatorConfig _cfg;
final BuildExecutor _exec; private final BuildExecutor _exec;
private TunnelBuildFirstHopFailJob(RouterContext ctx, TunnelPool pool, PooledTunnelCreatorConfig cfg, BuildExecutor exec) { private TunnelBuildFirstHopFailJob(RouterContext ctx, TunnelPool pool, PooledTunnelCreatorConfig cfg, BuildExecutor exec) {
super(ctx); super(ctx);
_cfg = cfg; _cfg = cfg;