mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-04 19:43:48 +00:00
feat(Core/Logging): rework logging (#4692)
* feat(Core/Logging): rework logging * correct level for sql.sql * del unused config options * Correct build * correct after merge * whitespace 20:29:37 1. 'Player.cpp'. Replace (1) 20:29:37 2. 'ObjectMgr.cpp'. Replace (3) * 1 * correct logging * correct affter merge * 1 * 2 * LOG_LEVEL_WARN * #include "AppenderDB.h" * 3 * 4 * 5 * 1. 'WorldSocket.cpp'. Replace (1) * 6 * 1
This commit is contained in:
@@ -69,11 +69,11 @@ Group::~Group()
|
||||
if (m_bgGroup)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Group::~Group: battleground group being deleted.");
|
||||
LOG_DEBUG("bg.battleground", "Group::~Group: battleground group being deleted.");
|
||||
#endif
|
||||
if (m_bgGroup->GetBgRaid(TEAM_ALLIANCE) == this) m_bgGroup->SetBgRaid(TEAM_ALLIANCE, nullptr);
|
||||
else if (m_bgGroup->GetBgRaid(TEAM_HORDE) == this) m_bgGroup->SetBgRaid(TEAM_HORDE, nullptr);
|
||||
else sLog->outError("Group::~Group: battleground group is not linked to the correct battleground.");
|
||||
else LOG_ERROR("server", "Group::~Group: battleground group is not linked to the correct battleground.");
|
||||
}
|
||||
Rolls::iterator itr;
|
||||
while (!RollId.empty())
|
||||
@@ -940,7 +940,6 @@ void Group::GroupLoot(Loot* loot, WorldObject* pLootedObject)
|
||||
item = sObjectMgr->GetItemTemplate(i->itemid);
|
||||
if (!item)
|
||||
{
|
||||
//sLog->outDebug("Group::GroupLoot: missing item prototype for item with id: %d", i->itemid);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1027,7 +1026,6 @@ void Group::GroupLoot(Loot* loot, WorldObject* pLootedObject)
|
||||
item = sObjectMgr->GetItemTemplate(i->itemid);
|
||||
if (!item)
|
||||
{
|
||||
//sLog->outDebug("Group::GroupLoot: missing item prototype for item with id: %d", i->itemid);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1223,7 +1221,7 @@ void Group::NeedBeforeGreed(Loot* loot, WorldObject* lootedObject)
|
||||
void Group::MasterLoot(Loot* loot, WorldObject* pLootedObject)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Group::MasterLoot (SMSG_LOOT_MASTER_LIST, 330)");
|
||||
LOG_DEBUG("network", "Group::MasterLoot (SMSG_LOOT_MASTER_LIST, 330)");
|
||||
#endif
|
||||
|
||||
for (std::vector<LootItem>::iterator i = loot->items.begin(); i != loot->items.end(); ++i)
|
||||
@@ -2037,7 +2035,7 @@ void Group::BroadcastGroupUpdate(void)
|
||||
pp->ForceValuesUpdateAtIndex(UNIT_FIELD_BYTES_2);
|
||||
pp->ForceValuesUpdateAtIndex(UNIT_FIELD_FACTIONTEMPLATE);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outStaticDebug("-- Forced group value update for '%s'", pp->GetName().c_str());
|
||||
LOG_DEBUG("server", "-- Forced group value update for '%s'", pp->GetName().c_str());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ uint32 GroupMgr::GenerateGroupId()
|
||||
|
||||
if (_nextGroupId == 0xFFFFFFFF)
|
||||
{
|
||||
sLog->outError("Group ID overflow!! Can't continue, shutting down server.");
|
||||
LOG_ERROR("server", "Group ID overflow!! Can't continue, shutting down server.");
|
||||
World::StopNow(ERROR_EXIT_CODE);
|
||||
}
|
||||
|
||||
@@ -109,8 +109,8 @@ void GroupMgr::LoadGroups()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 group definitions. DB table `groups` is empty!");
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded 0 group definitions. DB table `groups` is empty!");
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -131,12 +131,12 @@ void GroupMgr::LoadGroups()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded %u group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
}
|
||||
|
||||
sLog->outString("Loading Group members...");
|
||||
LOG_INFO("server", "Loading Group members...");
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -149,8 +149,8 @@ void GroupMgr::LoadGroups()
|
||||
QueryResult result = CharacterDatabase.Query("SELECT guid, memberGuid, memberFlags, subgroup, roles FROM group_member ORDER BY guid");
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 group members. DB table `group_member` is empty!");
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded 0 group members. DB table `group_member` is empty!");
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -163,13 +163,13 @@ void GroupMgr::LoadGroups()
|
||||
if (group)
|
||||
group->LoadMemberFromDB(fields[1].GetUInt32(), fields[2].GetUInt8(), fields[3].GetUInt8(), fields[4].GetUInt8());
|
||||
//else
|
||||
// sLog->outError("GroupMgr::LoadGroups: Consistency failed, can't find group (storage id: %u)", fields[0].GetUInt32());
|
||||
// LOG_ERROR("server", "GroupMgr::LoadGroups: Consistency failed, can't find group (storage id: %u)", fields[0].GetUInt32());
|
||||
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u group members in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded %u group members in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user