mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-27 20:32:21 +01:00
Core/Log: Implement log masks for debug log level, to allow selective debug output. Update your worldserver.conf.
This commit is contained in:
@@ -49,7 +49,7 @@ void Guild::SendCommandResult(WorldSession* session, GuildCommandType type, Guil
|
||||
data << uint32(errCode);
|
||||
session->SendPacket(&data);
|
||||
|
||||
sLog->outDebug("WORLD: Sent (SMSG_GUILD_COMMAND_RESULT)");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_COMMAND_RESULT)");
|
||||
}
|
||||
|
||||
void Guild::SendSaveEmblemResult(WorldSession* session, GuildEmblemError errCode)
|
||||
@@ -58,7 +58,7 @@ void Guild::SendSaveEmblemResult(WorldSession* session, GuildEmblemError errCode
|
||||
data << uint32(errCode);
|
||||
session->SendPacket(&data);
|
||||
|
||||
sLog->outDebug("WORLD: Sent (MSG_SAVE_GUILD_EMBLEM)");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (MSG_SAVE_GUILD_EMBLEM)");
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -914,7 +914,7 @@ Item* Guild::BankMoveItemData::StoreItem(SQLTransaction& trans, Item* pItem)
|
||||
ItemPosCount pos(*itr);
|
||||
++itr;
|
||||
|
||||
sLog->outDebug("GUILD STORAGE: StoreItem tab = %u, slot = %u, item = %u, count = %u",
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "GUILD STORAGE: StoreItem tab = %u, slot = %u, item = %u, count = %u",
|
||||
m_container, m_slotId, pItem->GetEntry(), pItem->GetCount());
|
||||
pLastItem = _StoreItem(trans, pTab, pItem, pos, itr != m_vec.end());
|
||||
}
|
||||
@@ -1023,7 +1023,7 @@ void Guild::BankMoveItemData::_CanStoreItemInTab(Item* pItem, uint8 skipSlotId,
|
||||
|
||||
uint8 Guild::BankMoveItemData::_CanStore(Item* pItem, bool swap)
|
||||
{
|
||||
sLog->outDebug("GUILD STORAGE: CanStore() tab = %u, slot = %u, item = %u, count = %u",
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "GUILD STORAGE: CanStore() tab = %u, slot = %u, item = %u, count = %u",
|
||||
m_container, m_slotId, pItem->GetEntry(), pItem->GetCount());
|
||||
|
||||
uint32 count = pItem->GetCount();
|
||||
@@ -1109,7 +1109,7 @@ bool Guild::Create(Player* pLeader, const std::string& name)
|
||||
m_createdDate = ::time(NULL);
|
||||
_CreateLogHolders();
|
||||
|
||||
sLog->outDebug("GUILD: creating guild [%s] for leader %s (%u)",
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "GUILD: creating guild [%s] for leader %s (%u)",
|
||||
name.c_str(), pLeader->GetName(), GUID_LOPART(m_leaderGuid));
|
||||
|
||||
PreparedStatement* stmt = NULL;
|
||||
@@ -1219,7 +1219,7 @@ void Guild::HandleRoster(WorldSession *session /*= NULL*/)
|
||||
session->SendPacket(&data);
|
||||
else
|
||||
BroadcastPacket(&data);
|
||||
sLog->outDebug("WORLD: Sent (SMSG_GUILD_ROSTER)");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_ROSTER)");
|
||||
}
|
||||
|
||||
void Guild::HandleQuery(WorldSession *session)
|
||||
@@ -1241,7 +1241,7 @@ void Guild::HandleQuery(WorldSession *session)
|
||||
data << uint32(0); // Something new in WotLK
|
||||
|
||||
session->SendPacket(&data);
|
||||
sLog->outDebug("WORLD: Sent (SMSG_GUILD_QUERY_RESPONSE)");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_QUERY_RESPONSE)");
|
||||
}
|
||||
|
||||
void Guild::HandleSetMOTD(WorldSession* session, const std::string& motd)
|
||||
@@ -1365,7 +1365,7 @@ void Guild::HandleSetRankInfo(WorldSession* session, uint8 rankId, const std::st
|
||||
SendCommandResult(session, GUILD_INVITE_S, ERR_GUILD_PERMISSIONS);
|
||||
else if (RankInfo* rankInfo = GetRankInfo(rankId))
|
||||
{
|
||||
sLog->outDebug("WORLD: Changed RankName to '%s', rights to 0x%08X", name.c_str(), rights);
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Changed RankName to '%s', rights to 0x%08X", name.c_str(), rights);
|
||||
|
||||
rankInfo->SetName(name);
|
||||
rankInfo->SetRights(rights);
|
||||
@@ -1440,7 +1440,7 @@ void Guild::HandleInviteMember(WorldSession* session, const std::string& name)
|
||||
return;
|
||||
}
|
||||
|
||||
sLog->outDebug("Player %s invited %s to join his Guild", player->GetName(), name.c_str());
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "Player %s invited %s to join his Guild", player->GetName(), name.c_str());
|
||||
|
||||
pInvitee->SetGuildIdInvited(m_id);
|
||||
_LogEvent(GUILD_EVENT_LOG_INVITE_PLAYER, player->GetGUIDLow(), pInvitee->GetGUIDLow());
|
||||
@@ -1450,7 +1450,7 @@ void Guild::HandleInviteMember(WorldSession* session, const std::string& name)
|
||||
data << m_name;
|
||||
pInvitee->GetSession()->SendPacket(&data);
|
||||
|
||||
sLog->outDebug("WORLD: Sent (SMSG_GUILD_INVITE)");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_INVITE)");
|
||||
}
|
||||
|
||||
void Guild::HandleAcceptMember(WorldSession* session)
|
||||
@@ -1714,7 +1714,7 @@ void Guild::HandleDisband(WorldSession* session)
|
||||
else
|
||||
{
|
||||
Disband();
|
||||
sLog->outDebug("WORLD: Guild Successfully Disbanded");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Guild Successfully Disbanded");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1729,7 +1729,7 @@ void Guild::SendInfo(WorldSession* session) const
|
||||
data << m_accountsNumber; // Number of accounts
|
||||
|
||||
session->SendPacket(&data);
|
||||
sLog->outDebug("WORLD: Sent (SMSG_GUILD_INFO)");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_INFO)");
|
||||
}
|
||||
|
||||
void Guild::SendEventLog(WorldSession *session) const
|
||||
@@ -1737,7 +1737,7 @@ void Guild::SendEventLog(WorldSession *session) const
|
||||
WorldPacket data(MSG_GUILD_EVENT_LOG_QUERY, 1 + m_eventLog->GetSize() * (1 + 8 + 4));
|
||||
m_eventLog->WritePacket(data);
|
||||
session->SendPacket(&data);
|
||||
sLog->outDebug("WORLD: Sent (MSG_GUILD_EVENT_LOG_QUERY)");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (MSG_GUILD_EVENT_LOG_QUERY)");
|
||||
}
|
||||
|
||||
void Guild::SendBankLog(WorldSession *session, uint8 tabId) const
|
||||
@@ -1750,7 +1750,7 @@ void Guild::SendBankLog(WorldSession *session, uint8 tabId) const
|
||||
data << uint8(tabId);
|
||||
pLog->WritePacket(data);
|
||||
session->SendPacket(&data);
|
||||
sLog->outDebug("WORLD: Sent (MSG_GUILD_BANK_LOG_QUERY)");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (MSG_GUILD_BANK_LOG_QUERY)");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1779,7 +1779,7 @@ void Guild::SendBankTabsInfo(WorldSession *session) const
|
||||
data << uint8(0); // Do not send tab content
|
||||
session->SendPacket(&data);
|
||||
|
||||
sLog->outDebug("WORLD: Sent (SMSG_GUILD_BANK_LIST)");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_BANK_LIST)");
|
||||
}
|
||||
|
||||
void Guild::SendBankTabText(WorldSession *session, uint8 tabId) const
|
||||
@@ -1805,7 +1805,7 @@ void Guild::SendPermissions(WorldSession *session) const
|
||||
data << uint32(_GetMemberRemainingSlots(guid, tabId));
|
||||
}
|
||||
session->SendPacket(&data);
|
||||
sLog->outDebug("WORLD: Sent (MSG_GUILD_PERMISSIONS)");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (MSG_GUILD_PERMISSIONS)");
|
||||
}
|
||||
|
||||
void Guild::SendMoneyInfo(WorldSession *session) const
|
||||
@@ -1813,7 +1813,7 @@ void Guild::SendMoneyInfo(WorldSession *session) const
|
||||
WorldPacket data(MSG_GUILD_BANK_MONEY_WITHDRAWN, 4);
|
||||
data << uint32(_GetMemberRemainingMoney(session->GetPlayer()->GetGUID()));
|
||||
session->SendPacket(&data);
|
||||
sLog->outDebug("WORLD: Sent MSG_GUILD_BANK_MONEY_WITHDRAWN");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent MSG_GUILD_BANK_MONEY_WITHDRAWN");
|
||||
}
|
||||
|
||||
void Guild::SendLoginInfo(WorldSession* session) const
|
||||
@@ -1823,7 +1823,7 @@ void Guild::SendLoginInfo(WorldSession* session) const
|
||||
data << uint8(1);
|
||||
data << m_motd;
|
||||
session->SendPacket(&data);
|
||||
sLog->outDebug("WORLD: Sent guild MOTD (SMSG_GUILD_EVENT)");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent guild MOTD (SMSG_GUILD_EVENT)");
|
||||
|
||||
SendBankTabsInfo(session);
|
||||
|
||||
@@ -2648,7 +2648,7 @@ void Guild::_SendBankContent(WorldSession *session, uint8 tabId) const
|
||||
|
||||
session->SendPacket(&data);
|
||||
|
||||
sLog->outDebug("WORLD: Sent (SMSG_GUILD_BANK_LIST)");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_BANK_LIST)");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2663,7 +2663,7 @@ void Guild::_SendBankMoneyUpdate(WorldSession *session) const
|
||||
data << uint8(0); // No items
|
||||
BroadcastPacket(&data);
|
||||
|
||||
sLog->outDebug("WORLD: Sent (SMSG_GUILD_BANK_LIST)");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_BANK_LIST)");
|
||||
}
|
||||
|
||||
void Guild::_SendBankContentUpdate(MoveItemData* pSrc, MoveItemData* pDest) const
|
||||
@@ -2723,7 +2723,7 @@ void Guild::_SendBankContentUpdate(uint8 tabId, SlotIds slots) const
|
||||
player->GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
sLog->outDebug("WORLD: Sent (SMSG_GUILD_BANK_LIST)");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_BANK_LIST)");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2747,5 +2747,5 @@ void Guild::_BroadcastEvent(GuildEvents guildEvent, const uint64& guid, const ch
|
||||
|
||||
BroadcastPacket(&data);
|
||||
|
||||
sLog->outDebug("WORLD: Sent SMSG_GUILD_EVENT");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_GUILD_EVENT");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user