refactor(Core/Network): remove redundant logging calls from some message handlers (#17565)

chore: removed redundant logging calls from some message handlers
This commit is contained in:
Tristan 'Natrist' Cormier
2023-11-08 15:53:43 -05:00
committed by GitHub
parent ef09d4b63f
commit f1cb3bfb3b
14 changed files with 3 additions and 129 deletions

View File

@@ -205,12 +205,6 @@ ObjectGuid::LowType WorldSession::GetGuidLow() const
/// Send a packet to the client
void WorldSession::SendPacket(WorldPacket const* packet)
{
if (packet->GetOpcode() == NULL_OPCODE)
{
LOG_ERROR("network.opcode", "{} send NULL_OPCODE", GetPlayerInfo());
return;
}
if (!m_Socket)
return;
@@ -255,7 +249,6 @@ void WorldSession::SendPacket(WorldPacket const* packet)
return;
}
LOG_TRACE("network.opcode", "S->C: {} {}", GetPlayerInfo(), GetOpcodeNameForLogging(static_cast<OpcodeServer>(packet->GetOpcode())));
m_Socket->SendPacket(*packet);
}
@@ -316,6 +309,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
ClientOpcodeHandler const* opHandle = opcodeTable[opcode];
METRIC_DETAILED_TIMER("worldsession_update_opcode_time", METRIC_TAG("opcode", opHandle->Name));
LOG_DEBUG("network", "message id {} ({}) under READ", opcode, opHandle->Name);
try
{
@@ -332,8 +326,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
requeuePackets.push_back(packet);
deletePacket = false;
LOG_DEBUG("network", "Re-enqueueing packet with opcode {} with with status STATUS_LOGGEDIN. "
"Player {} is currently not in world yet.", GetOpcodeNameForLogging(static_cast<OpcodeClient>(packet->GetOpcode())), GetPlayerInfo());
LOG_DEBUG("network", "Delaying processing of message with status STATUS_LOGGEDIN: No players in the world for account id {}", GetAccountId());
}
}
else if (_player->IsInWorld())