From 11d80e856811ceddec805ce68b0a17b13f5cf25e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 1 Sep 2014 12:38:59 +0300 Subject: In debug packets logging also display offset. --- src/net/messageout.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/net/messageout.cpp') diff --git a/src/net/messageout.cpp b/src/net/messageout.cpp index ff778d89a..0026538b5 100644 --- a/src/net/messageout.cpp +++ b/src/net/messageout.cpp @@ -47,9 +47,10 @@ MessageOut::MessageOut(const int16_t id A_UNUSED) : void MessageOut::writeInt8(const int8_t value, const char *const str) { - DEBUGLOG2("writeInt8: " + toStringPrint(static_cast(value)), str); expand(1); mData[mPos] = value; + DEBUGLOG2("writeInt8: " + toStringPrint(static_cast(value)), + mPos, str); mPos += 1; PacketCounters::incOutBytes(1); } @@ -83,8 +84,8 @@ void MessageOut::writeString(const std::string &string, length - stringLength); } + DEBUGLOG2("writeString: " + string, mPos, str); mPos += length; - DEBUGLOG2("writeString: " + string, str); PacketCounters::incOutBytes(length); } @@ -117,8 +118,8 @@ void MessageOut::writeStringNoLog(const std::string &string, length - stringLength); } + DEBUGLOG2("writeString: ***", mPos, str); mPos += length; - DEBUGLOG2("writeString: ***", str); PacketCounters::incOutBytes(length); } -- cgit v1.2.3-70-g09d2