Core/Log: Implement log masks for debug log level, to allow selective debug output. Update your worldserver.conf.
This commit is contained in:
@@ -708,7 +708,7 @@ bool Creature::AIM_Initialize(CreatureAI* ai)
|
||||
// make sure nothing can change the AI during AI update
|
||||
if (m_AI_locked)
|
||||
{
|
||||
sLog->outDebug("AIM_Initialize: failed to init, locked.");
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "AIM_Initialize: failed to init, locked.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1389,7 +1389,7 @@ void Creature::DeleteFromDB()
|
||||
{
|
||||
if (!m_DBTableGuid)
|
||||
{
|
||||
sLog->outDebug("Trying to delete not saved creature!");
|
||||
sLog->outError("Trying to delete not saved creature! LowGUID: %u, Entry: %u", GetGUIDLow(), GetEntry());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1853,7 +1853,7 @@ void Creature::SendAIReaction(AiReaction reactionType)
|
||||
|
||||
((WorldObject*)this)->SendMessageToSet(&data, true);
|
||||
|
||||
sLog->outDebug("WORLD: Sent SMSG_AI_REACTION, type %u.", reactionType);
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_AI_REACTION, type %u.", reactionType);
|
||||
}
|
||||
|
||||
void Creature::CallAssistance()
|
||||
@@ -2106,7 +2106,7 @@ bool Creature::LoadCreaturesAddon(bool reload)
|
||||
}
|
||||
|
||||
AddAura(AdditionalSpellInfo, cAura->effectMask, this);
|
||||
sLog->outDebug("Spell: %u with AuraEffectMask %u added to creature (GUID: %u Entry: %u)", cAura->spell_id, cAura->effectMask,GetGUIDLow(),GetEntry());
|
||||
sLog->outDebug(LOG_FILTER_UNITS, "Spell: %u with AuraEffectMask %u added to creature (GUID: %u Entry: %u)", cAura->spell_id, cAura->effectMask,GetGUIDLow(),GetEntry());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -37,13 +37,13 @@ void CreatureGroupManager::AddCreatureToGroup(uint32 groupId, Creature *member)
|
||||
//Add member to an existing group
|
||||
if (itr != map->CreatureGroupHolder.end())
|
||||
{
|
||||
sLog->outDebug("Group found: %u, inserting creature GUID: %u, Group InstanceID %u", groupId, member->GetGUIDLow(), member->GetInstanceId());
|
||||
sLog->outDebug(LOG_FILTER_UNITS, "Group found: %u, inserting creature GUID: %u, Group InstanceID %u", groupId, member->GetGUIDLow(), member->GetInstanceId());
|
||||
itr->second->AddMember(member);
|
||||
}
|
||||
//Create new group
|
||||
else
|
||||
{
|
||||
sLog->outDebug("Group not found: %u. Creating new group.", groupId);
|
||||
sLog->outDebug(LOG_FILTER_UNITS, "Group not found: %u. Creating new group.", groupId);
|
||||
CreatureGroup* group = new CreatureGroup(groupId);
|
||||
map->CreatureGroupHolder[groupId] = group;
|
||||
group->AddMember(member);
|
||||
@@ -52,7 +52,7 @@ void CreatureGroupManager::AddCreatureToGroup(uint32 groupId, Creature *member)
|
||||
|
||||
void CreatureGroupManager::RemoveCreatureFromGroup(CreatureGroup *group, Creature *member)
|
||||
{
|
||||
sLog->outDebug("Deleting member pointer to GUID: %u from group %u", group->GetId(), member->GetDBTableGUIDLow());
|
||||
sLog->outDebug(LOG_FILTER_UNITS, "Deleting member pointer to GUID: %u from group %u", group->GetId(), member->GetDBTableGUIDLow());
|
||||
group->RemoveMember(member);
|
||||
|
||||
if (group->isEmpty())
|
||||
@@ -61,7 +61,7 @@ void CreatureGroupManager::RemoveCreatureFromGroup(CreatureGroup *group, Creatur
|
||||
if (!map)
|
||||
return;
|
||||
|
||||
sLog->outDebug("Deleting group with InstanceID %u", member->GetInstanceId());
|
||||
sLog->outDebug(LOG_FILTER_UNITS, "Deleting group with InstanceID %u", member->GetInstanceId());
|
||||
map->CreatureGroupHolder.erase(group->GetId());
|
||||
delete group;
|
||||
}
|
||||
@@ -153,12 +153,12 @@ void CreatureGroupManager::LoadCreatureFormations()
|
||||
|
||||
void CreatureGroup::AddMember(Creature *member)
|
||||
{
|
||||
sLog->outDebug("CreatureGroup::AddMember: Adding unit GUID: %u.", member->GetGUIDLow());
|
||||
sLog->outDebug(LOG_FILTER_UNITS, "CreatureGroup::AddMember: Adding unit GUID: %u.", member->GetGUIDLow());
|
||||
|
||||
//Check if it is a leader
|
||||
if (member->GetDBTableGUIDLow() == m_groupID)
|
||||
{
|
||||
sLog->outDebug("Unit GUID: %u is formation leader. Adding group.", member->GetGUIDLow());
|
||||
sLog->outDebug(LOG_FILTER_UNITS, "Unit GUID: %u is formation leader. Adding group.", member->GetGUIDLow());
|
||||
m_leader = member;
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ void CreatureGroup::MemberAttackStart(Creature *member, Unit *target)
|
||||
for (CreatureGroupMemberType::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
|
||||
{
|
||||
if (m_leader) // avoid crash if leader was killed and reset.
|
||||
sLog->outDebug("GROUP ATTACK: group instance id %u calls member instid %u", m_leader->GetInstanceId(), member->GetInstanceId());
|
||||
sLog->outDebug(LOG_FILTER_UNITS, "GROUP ATTACK: group instance id %u calls member instid %u", m_leader->GetInstanceId(), member->GetInstanceId());
|
||||
|
||||
//Skip one check
|
||||
if (itr->first == member)
|
||||
@@ -214,7 +214,7 @@ void CreatureGroup::FormationReset(bool dismiss)
|
||||
itr->first->GetMotionMaster()->Initialize();
|
||||
else
|
||||
itr->first->GetMotionMaster()->MoveIdle(MOTION_SLOT_IDLE);
|
||||
sLog->outDebug("Set %s movement for member GUID: %u", dismiss ? "default" : "idle", itr->first->GetGUIDLow());
|
||||
sLog->outDebug(LOG_FILTER_UNITS, "Set %s movement for member GUID: %u", dismiss ? "default" : "idle", itr->first->GetGUIDLow());
|
||||
}
|
||||
}
|
||||
m_Formed = !dismiss;
|
||||
|
||||
@@ -59,7 +59,7 @@ class CreatureGroup
|
||||
public:
|
||||
//Group cannot be created empty
|
||||
explicit CreatureGroup(uint32 id) : m_leader(NULL), m_groupID(id), m_Formed(false) {}
|
||||
~CreatureGroup() { sLog->outDebug("Destroying group"); }
|
||||
~CreatureGroup() { sLog->outDebug(LOG_FILTER_UNITS, "Destroying group"); }
|
||||
|
||||
Creature* getLeader() const { return m_leader; }
|
||||
uint32 GetId() const { return m_groupID; }
|
||||
|
||||
@@ -198,7 +198,7 @@ void PlayerMenu::SendPointOfInterest(float X, float Y, uint32 Icon, uint32 Flags
|
||||
data << locName;
|
||||
|
||||
pSession->SendPacket(&data);
|
||||
//sLog->outDebug("WORLD: Sent SMSG_GOSSIP_POI");
|
||||
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: Sent SMSG_GOSSIP_POI");
|
||||
}
|
||||
|
||||
void PlayerMenu::SendPointOfInterest(uint32 poi_id)
|
||||
@@ -226,7 +226,7 @@ void PlayerMenu::SendPointOfInterest(uint32 poi_id)
|
||||
data << icon_name;
|
||||
|
||||
pSession->SendPacket(&data);
|
||||
//sLog->outDebug("WORLD: Sent SMSG_GOSSIP_POI");
|
||||
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: Sent SMSG_GOSSIP_POI");
|
||||
}
|
||||
|
||||
void PlayerMenu::SendTalking(uint32 textID)
|
||||
@@ -297,7 +297,7 @@ void PlayerMenu::SendTalking(uint32 textID)
|
||||
}
|
||||
pSession->SendPacket(&data);
|
||||
|
||||
sLog->outDebug("WORLD: Sent SMSG_NPC_TEXT_UPDATE ");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_NPC_TEXT_UPDATE ");
|
||||
}
|
||||
|
||||
void PlayerMenu::SendTalking(char const * title, char const * text)
|
||||
@@ -320,7 +320,7 @@ void PlayerMenu::SendTalking(char const * title, char const * text)
|
||||
|
||||
pSession->SendPacket(&data);
|
||||
|
||||
sLog->outDebug("WORLD: Sent SMSG_NPC_TEXT_UPDATE ");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_NPC_TEXT_UPDATE ");
|
||||
}
|
||||
|
||||
/*********************************************************/
|
||||
@@ -406,7 +406,7 @@ void PlayerMenu::SendQuestGiverQuestList(QEmote eEmote, const std::string& Title
|
||||
|
||||
data.put<uint8>(count_pos, count);
|
||||
pSession->SendPacket(&data);
|
||||
sLog->outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_LIST NPC Guid=%u", GUID_LOPART(npcGUID));
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_QUEST_LIST NPC Guid=%u", GUID_LOPART(npcGUID));
|
||||
}
|
||||
|
||||
void PlayerMenu::SendQuestGiverStatus(uint8 questStatus, uint64 npcGUID)
|
||||
@@ -416,7 +416,7 @@ void PlayerMenu::SendQuestGiverStatus(uint8 questStatus, uint64 npcGUID)
|
||||
data << uint8(questStatus);
|
||||
|
||||
pSession->SendPacket(&data);
|
||||
sLog->outDebug("WORLD: Sent SMSG_QUESTGIVER_STATUS NPC Guid=%u, status=%u", GUID_LOPART(npcGUID), questStatus);
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_STATUS NPC Guid=%u, status=%u", GUID_LOPART(npcGUID), questStatus);
|
||||
}
|
||||
|
||||
void PlayerMenu::SendQuestGiverQuestDetails(Quest const *pQuest, uint64 npcGUID, bool ActivateAccept)
|
||||
@@ -527,7 +527,7 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const *pQuest, uint64 npcGUID,
|
||||
}
|
||||
pSession->SendPacket(&data);
|
||||
|
||||
sLog->outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_DETAILS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId());
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_QUEST_DETAILS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId());
|
||||
}
|
||||
|
||||
void PlayerMenu::SendQuestQueryResponse(Quest const *pQuest)
|
||||
@@ -667,7 +667,7 @@ void PlayerMenu::SendQuestQueryResponse(Quest const *pQuest)
|
||||
data << ObjectiveText[iI];
|
||||
|
||||
pSession->SendPacket(&data);
|
||||
sLog->outDebug("WORLD: Sent SMSG_QUEST_QUERY_RESPONSE questid=%u", pQuest->GetQuestId());
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUEST_QUERY_RESPONSE questid=%u", pQuest->GetQuestId());
|
||||
}
|
||||
|
||||
void PlayerMenu::SendQuestGiverOfferReward(Quest const* pQuest, uint64 npcGUID, bool EnableNext)
|
||||
@@ -764,7 +764,7 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* pQuest, uint64 npcGUID,
|
||||
data << uint32(pQuest->RewRepValue[i]);
|
||||
|
||||
pSession->SendPacket(&data);
|
||||
sLog->outDebug("WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId());
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId());
|
||||
}
|
||||
|
||||
void PlayerMenu::SendQuestGiverRequestItems(Quest const *pQuest, uint64 npcGUID, bool Completable, bool CloseOnCancel)
|
||||
@@ -844,5 +844,5 @@ void PlayerMenu::SendQuestGiverRequestItems(Quest const *pQuest, uint64 npcGUID,
|
||||
data << uint32(0x10);
|
||||
|
||||
pSession->SendPacket(&data);
|
||||
sLog->outDebug("WORLD: Sent SMSG_QUESTGIVER_REQUEST_ITEMS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId());
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_REQUEST_ITEMS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user