Renamed DebugCategory to DoLog as the aggregate logging function for simplicity of use and shortened syntax of Log.DoLog

This commit is contained in:
Akkadius
2015-01-18 01:54:09 -06:00
parent af8ab89a36
commit 1c048cb1d1
119 changed files with 2653 additions and 2653 deletions
+18 -18
View File
@@ -768,7 +768,7 @@ void Group::CastGroupSpell(Mob* caster, uint16 spell_id) {
caster->SpellOnTarget(spell_id, members[z]->GetPet());
#endif
} else
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Group spell: %s is out of range %f at distance %f from %s", members[z]->GetName(), range, distance, caster->GetName());
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Group spell: %s is out of range %f at distance %f from %s", members[z]->GetName(), range, distance, caster->GetName());
}
}
@@ -807,7 +807,7 @@ void Group::GroupBardPulse(Mob* caster, uint16 spell_id) {
members[z]->GetPet()->BardPulse(spell_id, caster);
#endif
} else
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Group bard pulse: %s is out of range %f at distance %f from %s", members[z]->GetName(), range, distance, caster->GetName());
Log.DoLog(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Group bard pulse: %s is out of range %f at distance %f from %s", members[z]->GetName(), range, distance, caster->GetName());
}
}
}
@@ -1069,7 +1069,7 @@ bool Group::LearnMembers() {
return false;
if (results.RowCount() == 0) {
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting group members for group %lu: %s", (unsigned long)GetID(), results.ErrorMessage().c_str());
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting group members for group %lu: %s", (unsigned long)GetID(), results.ErrorMessage().c_str());
return false;
}
@@ -1098,7 +1098,7 @@ void Group::VerifyGroup() {
for (i = 0; i < MAX_GROUP_MEMBERS; i++) {
if (membername[i][0] == '\0') {
#if EQDEBUG >= 7
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Group %lu: Verify %d: Empty.\n", (unsigned long)GetID(), i);
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Group %lu: Verify %d: Empty.\n", (unsigned long)GetID(), i);
#endif
members[i] = nullptr;
continue;
@@ -1107,7 +1107,7 @@ void Group::VerifyGroup() {
Mob *them = entity_list.GetMob(membername[i]);
if(them == nullptr && members[i] != nullptr) { //they aren't in zone
#if EQDEBUG >= 6
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Member of group %lu named '%s' has disappeared!!", (unsigned long)GetID(), membername[i]);
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Member of group %lu named '%s' has disappeared!!", (unsigned long)GetID(), membername[i]);
#endif
membername[i][0] = '\0';
members[i] = nullptr;
@@ -1116,13 +1116,13 @@ void Group::VerifyGroup() {
if(them != nullptr && members[i] != them) { //our pointer is out of date... not so good.
#if EQDEBUG >= 5
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Member of group %lu named '%s' had an out of date pointer!!", (unsigned long)GetID(), membername[i]);
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Member of group %lu named '%s' had an out of date pointer!!", (unsigned long)GetID(), membername[i]);
#endif
members[i] = them;
continue;
}
#if EQDEBUG >= 8
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Member of group %lu named '%s' is valid.", (unsigned long)GetID(), membername[i]);
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::None, "Member of group %lu named '%s' is valid.", (unsigned long)GetID(), membername[i]);
#endif
}
}
@@ -1457,7 +1457,7 @@ void Group::DelegateMainTank(const char *NewMainTankName, uint8 toggle)
MainTankName.c_str(), GetID());
auto results = database.QueryDatabase(query);
if (!results.Success())
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to set group main tank: %s\n", results.ErrorMessage().c_str());
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to set group main tank: %s\n", results.ErrorMessage().c_str());
}
}
@@ -1503,7 +1503,7 @@ void Group::DelegateMainAssist(const char *NewMainAssistName, uint8 toggle)
MainAssistName.c_str(), GetID());
auto results = database.QueryDatabase(query);
if (!results.Success())
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to set group main assist: %s\n", results.ErrorMessage().c_str());
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to set group main assist: %s\n", results.ErrorMessage().c_str());
}
}
@@ -1550,7 +1550,7 @@ void Group::DelegatePuller(const char *NewPullerName, uint8 toggle)
PullerName.c_str(), GetID());
auto results = database.QueryDatabase(query);
if (!results.Success())
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to set group main puller: %s\n", results.ErrorMessage().c_str());
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to set group main puller: %s\n", results.ErrorMessage().c_str());
}
@@ -1701,7 +1701,7 @@ void Group::UnDelegateMainTank(const char *OldMainTankName, uint8 toggle)
std::string query = StringFormat("UPDATE group_leaders SET maintank = '' WHERE gid = %i LIMIT 1", GetID());
auto results = database.QueryDatabase(query);
if (!results.Success())
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to clear group main tank: %s\n", results.ErrorMessage().c_str());
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to clear group main tank: %s\n", results.ErrorMessage().c_str());
if(!toggle) {
for(uint32 i = 0; i < MAX_GROUP_MEMBERS; ++i) {
@@ -1750,7 +1750,7 @@ void Group::UnDelegateMainAssist(const char *OldMainAssistName, uint8 toggle)
std::string query = StringFormat("UPDATE group_leaders SET assist = '' WHERE gid = %i LIMIT 1", GetID());
auto results = database.QueryDatabase(query);
if (!results.Success())
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to clear group main assist: %s\n", results.ErrorMessage().c_str());
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to clear group main assist: %s\n", results.ErrorMessage().c_str());
if(!toggle)
{
@@ -1778,7 +1778,7 @@ void Group::UnDelegatePuller(const char *OldPullerName, uint8 toggle)
std::string query = StringFormat("UPDATE group_leaders SET puller = '' WHERE gid = %i LIMIT 1", GetID());
auto results = database.QueryDatabase(query);
if (!results.Success())
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to clear group main puller: %s\n", results.ErrorMessage().c_str());
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to clear group main puller: %s\n", results.ErrorMessage().c_str());
if(!toggle) {
for(uint32 i = 0; i < MAX_GROUP_MEMBERS; ++i) {
@@ -1861,7 +1861,7 @@ void Group::SetGroupMentor(int percent, char *name)
mentoree_name.c_str(), mentor_percent, GetID());
auto results = database.QueryDatabase(query);
if (!results.Success())
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to set group mentor: %s\n", results.ErrorMessage().c_str());
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to set group mentor: %s\n", results.ErrorMessage().c_str());
}
void Group::ClearGroupMentor()
@@ -1872,7 +1872,7 @@ void Group::ClearGroupMentor()
std::string query = StringFormat("UPDATE group_leaders SET mentoree = '', mentor_percent = 0 WHERE gid = %i LIMIT 1", GetID());
auto results = database.QueryDatabase(query);
if (!results.Success())
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to clear group mentor: %s\n", results.ErrorMessage().c_str());
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to clear group mentor: %s\n", results.ErrorMessage().c_str());
}
void Group::NotifyAssistTarget(Client *c)
@@ -1942,7 +1942,7 @@ void Group::DelegateMarkNPC(const char *NewNPCMarkerName)
NewNPCMarkerName, GetID());
auto results = database.QueryDatabase(query);
if (!results.Success())
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to set group mark npc: %s\n", results.ErrorMessage().c_str());
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to set group mark npc: %s\n", results.ErrorMessage().c_str());
}
void Group::NotifyMarkNPC(Client *c)
@@ -2023,7 +2023,7 @@ void Group::UnDelegateMarkNPC(const char *OldNPCMarkerName)
std::string query = StringFormat("UPDATE group_leaders SET marknpc = '' WHERE gid = %i LIMIT 1", GetID());
auto results = database.QueryDatabase(query);
if (!results.Success())
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to clear group marknpc: %s\n", results.ErrorMessage().c_str());
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to clear group marknpc: %s\n", results.ErrorMessage().c_str());
}
@@ -2040,7 +2040,7 @@ void Group::SaveGroupLeaderAA()
safe_delete_array(queryBuffer);
auto results = database.QueryDatabase(query);
if (!results.Success())
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to store LeadershipAA: %s\n", results.ErrorMessage().c_str());
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to store LeadershipAA: %s\n", results.ErrorMessage().c_str());
}