From 648b7bf6803ecb250fd095f60ed52c0ac75d0201 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 10 Sep 2014 15:13:53 +0300 Subject: Improve logging for unknown and unsupported packets. --- src/net/tmwa/network.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/net/tmwa/network.cpp') diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp index fa7565e46..3e0f0e3db 100644 --- a/src/net/tmwa/network.cpp +++ b/src/net/tmwa/network.cpp @@ -119,8 +119,9 @@ void Network::dispatchMessages() if (len == 0) { // need copy data for safty - std::string str = strprintf("Wrong packet %u ""received. Exiting.", - msgId); + std::string str = strprintf( + "Wrong packet %u 0x%x received. Exiting.", + msgId, msgId); logger->safeError(str); } @@ -130,7 +131,7 @@ void Network::dispatchMessages() if (handler) handler->handleMessage(msg); else - logger->log("Unhandled packet: %x", msgId); + logger->log("Unhandled packet: %u 0x%x", msgId, msgId); } skip(len); -- cgit v1.2.3-70-g09d2