Router: I2NP debug log improvements

This commit is contained in:
zzz
2020-05-01 11:51:28 +00:00
parent d7095b69b9
commit 90d9843acc
2 changed files with 15 additions and 13 deletions

View File

@ -99,8 +99,7 @@ public class DataMessage extends FastI2NPMessageImpl {
@Override
public String toString() {
StringBuilder buf = new StringBuilder();
buf.append("[DataMessage: ");
buf.append("\n\tData: ");
buf.append("[DataMessage: data ");
if (_data != null) {
buf.append(_data.length).append(" bytes");
if (_data.length <= 64)
@ -108,7 +107,7 @@ public class DataMessage extends FastI2NPMessageImpl {
} else {
buf.append("null");
}
buf.append("]");
buf.append(']');
return buf.toString();
}
}

View File

@ -445,25 +445,28 @@ public class DeliveryInstructions extends DataStructureImpl {
buf.append("\n\tDelivery mode: ");
switch (getDeliveryMode()) {
case DELIVERY_MODE_LOCAL:
buf.append("local");
buf.append("Local");
break;
case DELIVERY_MODE_DESTINATION:
buf.append("destination");
buf.append("Destination");
break;
case DELIVERY_MODE_ROUTER:
buf.append("router");
buf.append("Router");
break;
case DELIVERY_MODE_TUNNEL:
buf.append("tunnel");
buf.append("Tunnel");
break;
}
buf.append("\n\tDelay requested: ").append(getDelayRequested());
buf.append("\n\tDelay seconds: ").append(getDelaySeconds());
buf.append("\n\tDestination: ").append(getDestination());
if (_delayRequested)
buf.append("\n\tDelay seconds: ").append(_delaySeconds);
if (_destinationHash != null)
buf.append("\n\tDestination: ").append(_destinationHash.toBase32());
//buf.append("\n\tEncrypted: ").append(getEncrypted());
buf.append("\n\tEncryption key: ").append(getEncryptionKey());
buf.append("\n\tRouter: ").append(getRouter());
buf.append("\n\tTunnelId: ").append(getTunnelId());
//buf.append("\n\tEncryption key: ").append(getEncryptionKey());
if (_routerHash != null)
buf.append("\n\tRouter: ").append(_routerHash.toBase64());
if (_tunnelId != null)
buf.append("\n\tTunnelId: ").append(_tunnelId);
return buf.toString();
}