Core/Logging: Performance-related tweaks to logging system
All sLog->out* functions (except outCommand atm) are replaced with TC_LOG_* macros.
Memleak fix
This commit is contained in:
1 parent
243c325ca4
commit
d1677b2db0
240 files changed
+4580
-4563
No files matched your search
@@ -61,7 +61,7 @@ void WorldSession::HandleLfgJoinOpcode(WorldPacket& recvData)
|
||||
recvData >> numDungeons;
|
||||
if (!numDungeons)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_JOIN %s no dungeons selected", GetPlayerInfo().c_str());
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_JOIN %s no dungeons selected", GetPlayerInfo().c_str());
|
||||
recvData.rfinish();
|
||||
return;
|
||||
}
|
||||
@@ -78,7 +78,7 @@ void WorldSession::HandleLfgJoinOpcode(WorldPacket& recvData)
|
||||
|
||||
std::string comment;
|
||||
recvData >> comment;
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_JOIN %s roles: %u, Dungeons: %u, Comment: %s",
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_JOIN %s roles: %u, Dungeons: %u, Comment: %s",
|
||||
GetPlayerInfo().c_str(), roles, uint8(newDungeons.size()), comment.c_str());
|
||||
|
||||
sLFGMgr->JoinLfg(GetPlayer(), uint8(roles), newDungeons, comment);
|
||||
@@ -90,7 +90,7 @@ void WorldSession::HandleLfgLeaveOpcode(WorldPacket& /*recvData*/)
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
uint64 gguid = group ? group->GetGUID() : guid;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_LEAVE %s in group: %u",
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_LEAVE %s in group: %u",
|
||||
GetPlayerInfo().c_str(), group ? 1 : 0);
|
||||
|
||||
// Check cheating - only leader can leave the queue
|
||||
@@ -105,7 +105,7 @@ void WorldSession::HandleLfgProposalResultOpcode(WorldPacket& recvData)
|
||||
recvData >> lfgGroupID;
|
||||
recvData >> accept;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_PROPOSAL_RESULT %s proposal: %u accept: %u",
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_PROPOSAL_RESULT %s proposal: %u accept: %u",
|
||||
GetPlayerInfo().c_str(), lfgGroupID, accept ? 1 : 0);
|
||||
sLFGMgr->UpdateProposal(lfgGroupID, GetPlayer()->GetGUID(), accept);
|
||||
}
|
||||
@@ -118,12 +118,12 @@ void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recvData)
|
||||
Group* group = GetPlayer()->GetGroup();
|
||||
if (!group)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_SET_ROLES %s Not in group",
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_SET_ROLES %s Not in group",
|
||||
GetPlayerInfo().c_str());
|
||||
return;
|
||||
}
|
||||
uint64 gguid = group->GetGUID();
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_SET_ROLES: Group %u, Player %s, Roles: %u",
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_SET_ROLES: Group %u, Player %s, Roles: %u",
|
||||
GUID_LOPART(gguid), GetPlayerInfo().c_str(), roles);
|
||||
sLFGMgr->UpdateRoleCheck(gguid, guid, roles);
|
||||
}
|
||||
@@ -133,7 +133,7 @@ void WorldSession::HandleLfgSetCommentOpcode(WorldPacket& recvData)
|
||||
std::string comment;
|
||||
recvData >> comment;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_SET_COMMENT %s comment: %s",
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_SET_COMMENT %s comment: %s",
|
||||
GetPlayerInfo().c_str(), comment.c_str());
|
||||
|
||||
sLFGMgr->SetComment(GetPlayer()->GetGUID(), comment);
|
||||
@@ -145,7 +145,7 @@ void WorldSession::HandleLfgSetBootVoteOpcode(WorldPacket& recvData)
|
||||
recvData >> agree;
|
||||
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_SET_BOOT_VOTE %s agree: %u",
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_SET_BOOT_VOTE %s agree: %u",
|
||||
GetPlayerInfo().c_str(), agree ? 1 : 0);
|
||||
sLFGMgr->UpdateBoot(guid, agree);
|
||||
}
|
||||
@@ -155,7 +155,7 @@ void WorldSession::HandleLfgTeleportOpcode(WorldPacket& recvData)
|
||||
bool out;
|
||||
recvData >> out;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_TELEPORT %s out: %u",
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_TELEPORT %s out: %u",
|
||||
GetPlayerInfo().c_str(), out ? 1 : 0);
|
||||
sLFGMgr->TeleportPlayer(GetPlayer(), out, true);
|
||||
}
|
||||
@@ -163,7 +163,7 @@ void WorldSession::HandleLfgTeleportOpcode(WorldPacket& recvData)
|
||||
void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*/)
|
||||
{
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_PLAYER_LOCK_INFO_REQUEST %s",
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_PLAYER_LOCK_INFO_REQUEST %s",
|
||||
GetPlayerInfo().c_str());
|
||||
|
||||
// Get Random dungeons that can be done at a certain level and expansion
|
||||
@@ -176,7 +176,7 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*
|
||||
uint32 rsize = uint32(randomDungeons.size());
|
||||
uint32 lsize = uint32(lock.size());
|
||||
|
||||
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_PLAYER_INFO %s", GetPlayerInfo().c_str());
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_PLAYER_INFO %s", GetPlayerInfo().c_str());
|
||||
WorldPacket data(SMSG_LFG_PLAYER_INFO, 1 + rsize * (4 + 1 + 4 + 4 + 4 + 4 + 1 + 4 + 4 + 4) + 4 + lsize * (1 + 4 + 4 + 4 + 4 + 1 + 4 + 4 + 4));
|
||||
|
||||
data << uint8(randomDungeons.size()); // Random Dungeon count
|
||||
@@ -234,7 +234,7 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*
|
||||
void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recvData*/)
|
||||
{
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_PARTY_LOCK_INFO_REQUEST %s", GetPlayerInfo().c_str());
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_PARTY_LOCK_INFO_REQUEST %s", GetPlayerInfo().c_str());
|
||||
|
||||
Group* group = GetPlayer()->GetGroup();
|
||||
if (!group)
|
||||
@@ -259,7 +259,7 @@ void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recvData*
|
||||
for (lfg::LfgLockPartyMap::const_iterator it = lockMap.begin(); it != lockMap.end(); ++it)
|
||||
size += 8 + 4 + uint32(it->second.size()) * (4 + 4);
|
||||
|
||||
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_PARTY_INFO %s", GetPlayerInfo().c_str());
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_PARTY_INFO %s", GetPlayerInfo().c_str());
|
||||
WorldPacket data(SMSG_LFG_PARTY_INFO, 1 + size);
|
||||
BuildPartyLockDungeonBlock(data, lockMap);
|
||||
SendPacket(&data);
|
||||
@@ -269,7 +269,7 @@ void WorldSession::HandleLfrJoinOpcode(WorldPacket& recvData)
|
||||
{
|
||||
uint32 entry; // Raid id to search
|
||||
recvData >> entry;
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_LFR_JOIN %s dungeon entry: %u",
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_LFR_JOIN %s dungeon entry: %u",
|
||||
GetPlayerInfo().c_str(), entry);
|
||||
//SendLfrUpdateListOpcode(entry);
|
||||
}
|
||||
@@ -278,14 +278,14 @@ void WorldSession::HandleLfrLeaveOpcode(WorldPacket& recvData)
|
||||
{
|
||||
uint32 dungeonId; // Raid id queue to leave
|
||||
recvData >> dungeonId;
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_LFR_LEAVE %s dungeonId: %u",
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_LFR_LEAVE %s dungeonId: %u",
|
||||
GetPlayerInfo().c_str(), dungeonId);
|
||||
//sLFGMgr->LeaveLfr(GetPlayer(), dungeonId);
|
||||
}
|
||||
|
||||
void WorldSession::HandleLfgGetStatus(WorldPacket& /*recvData*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_GET_STATUS %s", GetPlayerInfo().c_str());
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "CMSG_LFG_GET_STATUS %s", GetPlayerInfo().c_str());
|
||||
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
lfg::LfgUpdateData updateData = sLFGMgr->GetLfgStatus(guid);
|
||||
@@ -322,7 +322,7 @@ void WorldSession::SendLfgUpdatePlayer(lfg::LfgUpdateData const& updateData)
|
||||
break;
|
||||
}
|
||||
|
||||
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_UPDATE_PLAYER %s updatetype: %u",
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_UPDATE_PLAYER %s updatetype: %u",
|
||||
GetPlayerInfo().c_str(), updateData.updateType);
|
||||
WorldPacket data(SMSG_LFG_UPDATE_PLAYER, 1 + 1 + (size > 0 ? 1 : 0) * (1 + 1 + 1 + 1 + size * 4 + updateData.comment.length()));
|
||||
data << uint8(updateData.updateType); // Lfg Update type
|
||||
@@ -363,7 +363,7 @@ void WorldSession::SendLfgUpdateParty(const lfg::LfgUpdateData& updateData)
|
||||
break;
|
||||
}
|
||||
|
||||
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_UPDATE_PARTY %s updatetype: %u",
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_UPDATE_PARTY %s updatetype: %u",
|
||||
GetPlayerInfo().c_str(), updateData.updateType);
|
||||
WorldPacket data(SMSG_LFG_UPDATE_PARTY, 1 + 1 + (size > 0 ? 1 : 0) * (1 + 1 + 1 + 1 + 1 + size * 4 + updateData.comment.length()));
|
||||
data << uint8(updateData.updateType); // Lfg Update type
|
||||
@@ -387,7 +387,7 @@ void WorldSession::SendLfgUpdateParty(const lfg::LfgUpdateData& updateData)
|
||||
|
||||
void WorldSession::SendLfgRoleChosen(uint64 guid, uint8 roles)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_ROLE_CHOSEN %s guid: %u roles: %u",
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_ROLE_CHOSEN %s guid: %u roles: %u",
|
||||
GetPlayerInfo().c_str(), GUID_LOPART(guid), roles);
|
||||
|
||||
WorldPacket data(SMSG_LFG_ROLE_CHOSEN, 8 + 1 + 4);
|
||||
@@ -405,7 +405,7 @@ void WorldSession::SendLfgRoleCheckUpdate(lfg::LfgRoleCheck const& roleCheck)
|
||||
else
|
||||
dungeons = roleCheck.dungeons;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_ROLE_CHECK_UPDATE %s", GetPlayerInfo().c_str());
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_ROLE_CHECK_UPDATE %s", GetPlayerInfo().c_str());
|
||||
WorldPacket data(SMSG_LFG_ROLE_CHECK_UPDATE, 4 + 1 + 1 + dungeons.size() * 4 + 1 + roleCheck.roles.size() * (8 + 1 + 4 + 1));
|
||||
|
||||
data << uint32(roleCheck.state); // Check result
|
||||
@@ -450,7 +450,7 @@ void WorldSession::SendLfgJoinResult(lfg::LfgJoinResultData const& joinData)
|
||||
for (lfg::LfgLockPartyMap::const_iterator it = joinData.lockmap.begin(); it != joinData.lockmap.end(); ++it)
|
||||
size += 8 + 4 + uint32(it->second.size()) * (4 + 4);
|
||||
|
||||
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_JOIN_RESULT %s checkResult: %u checkValue: %u",
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_JOIN_RESULT %s checkResult: %u checkValue: %u",
|
||||
GetPlayerInfo().c_str(), joinData.result, joinData.state);
|
||||
|
||||
WorldPacket data(SMSG_LFG_JOIN_RESULT, 4 + 4 + size);
|
||||
@@ -463,7 +463,7 @@ void WorldSession::SendLfgJoinResult(lfg::LfgJoinResultData const& joinData)
|
||||
|
||||
void WorldSession::SendLfgQueueStatus(lfg::LfgQueueStatusData const& queueData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_QUEUE_STATUS %s dungeon: %u, waitTime: %d, "
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_QUEUE_STATUS %s dungeon: %u, waitTime: %d, "
|
||||
"avgWaitTime: %d, waitTimeTanks: %d, waitTimeHealer: %d, waitTimeDps: %d, "
|
||||
"queuedTime: %u, tanks: %u, healers: %u, dps: %u",
|
||||
GetPlayerInfo().c_str(), queueData.dungeonId, queueData.waitTime, queueData.waitTimeAvg,
|
||||
@@ -489,7 +489,7 @@ void WorldSession::SendLfgPlayerReward(lfg::LfgPlayerRewardData const& rewardDat
|
||||
if (!rewardData.rdungeonEntry || !rewardData.sdungeonEntry || !rewardData.quest)
|
||||
return;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_PLAYER_REWARD %s rdungeonEntry: %u, sdungeonEntry: %u, done: %u",
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_PLAYER_REWARD %s rdungeonEntry: %u, sdungeonEntry: %u, done: %u",
|
||||
GetPlayerInfo().c_str(), rewardData.rdungeonEntry, rewardData.sdungeonEntry, rewardData.done);
|
||||
|
||||
uint8 itemNum = rewardData.quest->GetRewItemsCount();
|
||||
@@ -534,7 +534,7 @@ void WorldSession::SendLfgBootProposalUpdate(lfg::LfgPlayerBoot const& boot)
|
||||
++agreeNum;
|
||||
}
|
||||
}
|
||||
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_BOOT_PROPOSAL_UPDATE %s inProgress: %u - "
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_BOOT_PROPOSAL_UPDATE %s inProgress: %u - "
|
||||
"didVote: %u - agree: %u - victim: %u votes: %u - agrees: %u - left: %u - "
|
||||
"needed: %u - reason %s",
|
||||
GetPlayerInfo().c_str(), uint8(boot.inProgress), uint8(playerVote != lfg::LFG_ANSWER_PENDING),
|
||||
@@ -560,7 +560,7 @@ void WorldSession::SendLfgUpdateProposal(lfg::LfgProposal const& proposal)
|
||||
bool silent = !proposal.isNew && gguid == proposal.group;
|
||||
uint32 dungeonEntry = proposal.dungeonId;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_PROPOSAL_UPDATE %s state: %u",
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_PROPOSAL_UPDATE %s state: %u",
|
||||
GetPlayerInfo().c_str(), proposal.state);
|
||||
|
||||
// show random dungeon if player selected random dungeon and it's not lfg group
|
||||
@@ -604,7 +604,7 @@ void WorldSession::SendLfgUpdateProposal(lfg::LfgProposal const& proposal)
|
||||
|
||||
void WorldSession::SendLfgLfrList(bool update)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_LFR_LIST %s update: %u",
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_LFR_LIST %s update: %u",
|
||||
GetPlayerInfo().c_str(), update ? 1 : 0);
|
||||
WorldPacket data(SMSG_LFG_UPDATE_SEARCH, 1);
|
||||
data << uint8(update); // In Lfg Queue?
|
||||
@@ -613,14 +613,14 @@ void WorldSession::SendLfgLfrList(bool update)
|
||||
|
||||
void WorldSession::SendLfgDisabled()
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_DISABLED %s", GetPlayerInfo().c_str());
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_DISABLED %s", GetPlayerInfo().c_str());
|
||||
WorldPacket data(SMSG_LFG_DISABLED, 0);
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::SendLfgOfferContinue(uint32 dungeonEntry)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_OFFER_CONTINUE %s dungeon entry: %u",
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_OFFER_CONTINUE %s dungeon entry: %u",
|
||||
GetPlayerInfo().c_str(), dungeonEntry);
|
||||
WorldPacket data(SMSG_LFG_OFFER_CONTINUE, 4);
|
||||
data << uint32(dungeonEntry);
|
||||
@@ -629,7 +629,7 @@ void WorldSession::SendLfgOfferContinue(uint32 dungeonEntry)
|
||||
|
||||
void WorldSession::SendLfgTeleportError(uint8 err)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_TELEPORT_DENIED %s reason: %u",
|
||||
TC_LOG_DEBUG(LOG_FILTER_LFG, "SMSG_LFG_TELEPORT_DENIED %s reason: %u",
|
||||
GetPlayerInfo().c_str(), err);
|
||||
WorldPacket data(SMSG_LFG_TELEPORT_DENIED, 4);
|
||||
data << uint32(err); // Error
|
||||
@@ -639,7 +639,7 @@ void WorldSession::SendLfgTeleportError(uint8 err)
|
||||
/*
|
||||
void WorldSession::SendLfrUpdateListOpcode(uint32 dungeonEntry)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_PACKETIO, "SMSG_LFG_UPDATE_LIST %s dungeon entry: %u",
|
||||
TC_LOG_DEBUG(LOG_FILTER_PACKETIO, "SMSG_LFG_UPDATE_LIST %s dungeon entry: %u",
|
||||
GetPlayerInfo().c_str(), dungeonEntry);
|
||||
WorldPacket data(SMSG_LFG_UPDATE_LIST);
|
||||
SendPacket(&data);
|
||||
|
||||
Reference in new issue
Block a user