Change: reworked the debug levels for network facility (#9251)

It now follows very simple rules:
0 - Fatal, user should know about this
1 - Error, but we are recovering
2 - Warning, wrong but okay if you don't know
3 - Info, information you might care about
4 -
5 - Debug #1 - High level debug messages
6 - Debug #2 - Low level debug messages
7 - Trace information
This commit is contained in:
Patric Stout
2021-05-12 16:34:02 +02:00
committed by GitHub
parent 56050fc96f
commit b136e65cf9
24 changed files with 132 additions and 133 deletions

View File

@@ -117,9 +117,9 @@ NetworkRecvStatus NetworkGameSocketHandler::HandlePacket(Packet *p)
this->CloseConnection();
if (this->HasClientQuit()) {
DEBUG(net, 0, "[tcp/game] received invalid packet type %d from client %d", type, this->client_id);
DEBUG(net, 0, "[tcp/game] Received invalid packet type %d from client %d", type, this->client_id);
} else {
DEBUG(net, 0, "[tcp/game] received illegal packet from client %d", this->client_id);
DEBUG(net, 0, "[tcp/game] Received illegal packet from client %d", this->client_id);
}
return NETWORK_RECV_STATUS_MALFORMED_PACKET;
}
@@ -151,7 +151,7 @@ NetworkRecvStatus NetworkGameSocketHandler::ReceivePackets()
*/
NetworkRecvStatus NetworkGameSocketHandler::ReceiveInvalidPacket(PacketGameType type)
{
DEBUG(net, 0, "[tcp/game] received illegal packet type %d from client %d", type, this->client_id);
DEBUG(net, 0, "[tcp/game] Received illegal packet type %d from client %d", type, this->client_id);
return NETWORK_RECV_STATUS_MALFORMED_PACKET;
}