log tweaks

This commit is contained in:
zzz
2015-05-27 20:52:00 +00:00
parent 11ab7fc56c
commit 5e33ed1169
2 changed files with 6 additions and 4 deletions

View File

@@ -1545,9 +1545,10 @@ class NTCPConnection {
}
} catch (I2NPMessageException ime) {
if (_log.shouldLog(Log.WARN)) {
_log.warn("Error parsing I2NP message", ime);
_log.warn("DUMP:\n" + HexDump.dump(_dataBuf.getData(), 0, _size));
_log.warn("RAW:\n" + Base64.encode(_dataBuf.getData(), 0, _size));
_log.warn("Error parsing I2NP message" +
"\nDUMP:\n" + HexDump.dump(_dataBuf.getData(), 0, _size) +
"\nRAW:\n" + Base64.encode(_dataBuf.getData(), 0, _size) +
ime);
}
_context.statManager().addRateData("ntcp.corruptI2NPIME", 1);
// Don't close the con, possible attack vector, not necessarily the peer's fault,

View File

@@ -342,7 +342,8 @@ class InboundMessageState implements CDQEntry {
buf.append(" completely received with ");
//buf.append(getCompleteSize()).append(" bytes");
// may display -1 but avoid cascaded exceptions after release
buf.append(_completeSize).append(" bytes");
buf.append(_completeSize).append(" bytes in ");
buf.append(_lastFragment + 1).append(" fragments");
} else {
for (int i = 0; i <= _lastFragment; i++) {
buf.append(" fragment ").append(i);