Core/Network: Enable trace loggers for packet send and receive (just account + opcodeName, opcodeId)

This commit is contained in:
Spp
2012-11-23 12:36:18 +01:00
parent 26006551e2
commit 0c4e8c8dc2
2 changed files with 14 additions and 9 deletions
+6
View File
@@ -163,6 +163,9 @@ int WorldSocket::SendPacket(WorldPacket const& pct)
if (sPacketLog->CanLogPacket())
sPacketLog->LogPacket(pct, SERVER_TO_CLIENT);
if (m_Session)
sLog->outTrace(LOG_FILTER_OPCODES, "S->C %s %s", m_Session->GetPlayerInfo().c_str(), GetOpcodeNameForLogging(pct.GetOpcode()).c_str());
// Create a copy of the original packet; this is to avoid issues if a hook modifies it.
sScriptMgr->OnPacketSend(this, WorldPacket(pct));
@@ -674,6 +677,9 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct)
if (sPacketLog->CanLogPacket())
sPacketLog->LogPacket(*new_pct, CLIENT_TO_SERVER);
if (m_Session)
sLog->outTrace(LOG_FILTER_OPCODES, "C->S %s %s", m_Session->GetPlayerInfo().c_str(), GetOpcodeNameForLogging(new_pct.GetOpcode()).c_str());
try
{
switch (opcode)