forked from I2P_Developers/i2p.i2p
toString() for logging
This commit is contained in:
@@ -736,4 +736,16 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa
|
||||
SimpleScheduler.getInstance().addEvent(new SessionIdleTimer(_context, this, reduce, close), SessionIdleTimer.MINIMUM_TIME);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder buf = new StringBuilder(32);
|
||||
buf.append("Session: ");
|
||||
if (_myDestination != null)
|
||||
buf.append(_myDestination.calculateHash().toBase64().substring(0, 4));
|
||||
else
|
||||
buf.append("[null dest]");
|
||||
buf.append(getPrefix());
|
||||
return buf.toString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user