chore(Core/Logging): replace most server loggers (#5726)

* chore(Core/Logging): replace most server loggers

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
Kargatum
2021-06-21 08:07:12 +07:00
committed by GitHub
parent 9f80a592bb
commit 5787d00d54
199 changed files with 2312 additions and 4487 deletions

View File

@@ -58,7 +58,7 @@ void WorldSession::HandleNameQueryOpcode(WorldPacket& recvData)
recvData >> guid;
// This is disable by default to prevent lots of console spam
// LOG_INFO("server", "HandleNameQueryOpcode %u", guid);
// LOG_INFO("network.opcode", "HandleNameQueryOpcode %u", guid);
SendNameQueryOpcode(guid);
}
@@ -134,15 +134,11 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket& recvData)
}
else
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_CREATURE_QUERY - NO CREATURE INFO! (%s)", guid.ToString().c_str());
#endif
WorldPacket data(SMSG_CREATURE_QUERY_RESPONSE, 4);
data << uint32(entry | 0x80000000);
SendPacket(&data);
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE");
#endif
}
}
@@ -173,9 +169,7 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket& recvData)
ObjectMgr::GetLocaleString(gameObjectLocale->CastBarCaption, localeConstant, CastBarCaption);
}
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_GAMEOBJECT_QUERY '%s' - Entry: %u. ", info->name.c_str(), entry);
#endif
WorldPacket data (SMSG_GAMEOBJECT_QUERY_RESPONSE, 150);
data << uint32(entry);
data << uint32(info->type);
@@ -197,29 +191,21 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket& recvData)
data << uint32(0);
SendPacket(&data);
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE");
#endif
}
else
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_GAMEOBJECT_QUERY - Missing gameobject info for (%s)", guid.ToString().c_str());
#endif
WorldPacket data (SMSG_GAMEOBJECT_QUERY_RESPONSE, 4);
data << uint32(entry | 0x80000000);
SendPacket(&data);
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE");
#endif
}
}
void WorldSession::HandleCorpseQueryOpcode(WorldPacket& /*recvData*/)
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received MSG_CORPSE_QUERY");
#endif
if (!_player->HasCorpse())
{
@@ -273,9 +259,7 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket& recvData)
ObjectGuid guid;
recvData >> textID;
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_NPC_TEXT_QUERY TextId: %u", textID);
#endif
recvData >> guid;
@@ -352,17 +336,13 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket& recvData)
SendPacket(&data);
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_NPC_TEXT_UPDATE");
#endif
}
/// Only _static_ data is sent in this packet !!!
void WorldSession::HandlePageTextQueryOpcode(WorldPacket& recvData)
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_PAGE_TEXT_QUERY");
#endif
uint32 pageID;
recvData >> pageID;
@@ -396,17 +376,13 @@ void WorldSession::HandlePageTextQueryOpcode(WorldPacket& recvData)
}
SendPacket(&data);
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_PAGE_TEXT_QUERY_RESPONSE");
#endif
}
}
void WorldSession::HandleCorpseMapPositionQuery(WorldPacket& recvData)
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Recv CMSG_CORPSE_MAP_POSITION_QUERY");
#endif
uint32 unk;
recvData >> unk;