mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-09 03:18:57 +01:00
Core/Logging: Remove LOG_FILTER_XXX defines with it's value (remember logger names are case-sensitive)
This commit is contained in:
@@ -365,7 +365,7 @@ void PoolGroup<Creature>::Spawn1Object(PoolObject* obj)
|
||||
if (!map->Instanceable() && map->IsGridLoaded(data->posX, data->posY))
|
||||
{
|
||||
Creature* creature = new Creature;
|
||||
//TC_LOG_DEBUG(LOG_FILTER_POOLSYS, "Spawning creature %u", guid);
|
||||
//TC_LOG_DEBUG("pool", "Spawning creature %u", guid);
|
||||
if (!creature->LoadCreatureFromDB(obj->guid, map))
|
||||
{
|
||||
delete creature;
|
||||
@@ -389,7 +389,7 @@ void PoolGroup<GameObject>::Spawn1Object(PoolObject* obj)
|
||||
if (!map->Instanceable() && map->IsGridLoaded(data->posX, data->posY))
|
||||
{
|
||||
GameObject* pGameobject = new GameObject;
|
||||
//TC_LOG_DEBUG(LOG_FILTER_POOLSYS, "Spawning gameobject %u", guid);
|
||||
//TC_LOG_DEBUG("pool", "Spawning gameobject %u", guid);
|
||||
if (!pGameobject->LoadGameObjectFromDB(obj->guid, map, false))
|
||||
{
|
||||
delete pGameobject;
|
||||
@@ -420,7 +420,7 @@ void PoolGroup<Quest>::Spawn1Object(PoolObject* obj)
|
||||
PooledQuestRelationBoundsNC qr = sPoolMgr->mQuestCreatureRelation.equal_range(obj->guid);
|
||||
for (PooledQuestRelation::iterator itr = qr.first; itr != qr.second; ++itr)
|
||||
{
|
||||
TC_LOG_DEBUG(LOG_FILTER_POOLSYS, "PoolGroup<Quest>: Adding quest %u to creature %u", itr->first, itr->second);
|
||||
TC_LOG_DEBUG("pool", "PoolGroup<Quest>: Adding quest %u to creature %u", itr->first, itr->second);
|
||||
questMap->insert(QuestRelations::value_type(itr->second, itr->first));
|
||||
}
|
||||
|
||||
@@ -429,7 +429,7 @@ void PoolGroup<Quest>::Spawn1Object(PoolObject* obj)
|
||||
qr = sPoolMgr->mQuestGORelation.equal_range(obj->guid);
|
||||
for (PooledQuestRelation::iterator itr = qr.first; itr != qr.second; ++itr)
|
||||
{
|
||||
TC_LOG_DEBUG(LOG_FILTER_POOLSYS, "PoolGroup<Quest>: Adding quest %u to GO %u", itr->first, itr->second);
|
||||
TC_LOG_DEBUG("pool", "PoolGroup<Quest>: Adding quest %u to GO %u", itr->first, itr->second);
|
||||
questMap->insert(QuestRelations::value_type(itr->second, itr->first));
|
||||
}
|
||||
}
|
||||
@@ -437,7 +437,7 @@ void PoolGroup<Quest>::Spawn1Object(PoolObject* obj)
|
||||
template <>
|
||||
void PoolGroup<Quest>::SpawnObject(ActivePoolData& spawns, uint32 limit, uint32 triggerFrom)
|
||||
{
|
||||
TC_LOG_DEBUG(LOG_FILTER_POOLSYS, "PoolGroup<Quest>: Spawning pool %u", poolId);
|
||||
TC_LOG_DEBUG("pool", "PoolGroup<Quest>: Spawning pool %u", poolId);
|
||||
// load state from db
|
||||
if (!triggerFrom)
|
||||
{
|
||||
@@ -566,7 +566,7 @@ void PoolMgr::LoadFromDB()
|
||||
if (!result)
|
||||
{
|
||||
mPoolTemplate.clear();
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 object pools. DB table `pool_template` is empty.");
|
||||
TC_LOG_INFO("server.loading", ">> Loaded 0 object pools. DB table `pool_template` is empty.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -584,12 +584,12 @@ void PoolMgr::LoadFromDB()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u objects pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
TC_LOG_INFO("server.loading", ">> Loaded %u objects pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
// Creatures
|
||||
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Creatures Pooling Data...");
|
||||
TC_LOG_INFO("server.loading", "Loading Creatures Pooling Data...");
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -598,7 +598,7 @@ void PoolMgr::LoadFromDB()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 creatures in pools. DB table `pool_creature` is empty.");
|
||||
TC_LOG_INFO("server.loading", ">> Loaded 0 creatures in pools. DB table `pool_creature` is empty.");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -614,17 +614,17 @@ void PoolMgr::LoadFromDB()
|
||||
CreatureData const* data = sObjectMgr->GetCreatureData(guid);
|
||||
if (!data)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_creature` has a non existing creature spawn (GUID: %u) defined for pool id (%u), skipped.", guid, pool_id);
|
||||
TC_LOG_ERROR("sql.sql", "`pool_creature` has a non existing creature spawn (GUID: %u) defined for pool id (%u), skipped.", guid, pool_id);
|
||||
continue;
|
||||
}
|
||||
if (pool_id > max_pool_id)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_creature` pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", pool_id);
|
||||
TC_LOG_ERROR("sql.sql", "`pool_creature` pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", pool_id);
|
||||
continue;
|
||||
}
|
||||
if (chance < 0 || chance > 100)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_creature` has an invalid chance (%f) for creature guid (%u) in pool id (%u), skipped.", chance, guid, pool_id);
|
||||
TC_LOG_ERROR("sql.sql", "`pool_creature` has an invalid chance (%f) for creature guid (%u) in pool id (%u), skipped.", chance, guid, pool_id);
|
||||
continue;
|
||||
}
|
||||
PoolTemplateData* pPoolTemplate = &mPoolTemplate[pool_id];
|
||||
@@ -639,13 +639,13 @@ void PoolMgr::LoadFromDB()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u creatures in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
TC_LOG_INFO("server.loading", ">> Loaded %u creatures in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
}
|
||||
|
||||
// Gameobjects
|
||||
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Gameobject Pooling Data...");
|
||||
TC_LOG_INFO("server.loading", "Loading Gameobject Pooling Data...");
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -654,7 +654,7 @@ void PoolMgr::LoadFromDB()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 gameobjects in pools. DB table `pool_gameobject` is empty.");
|
||||
TC_LOG_INFO("server.loading", ">> Loaded 0 gameobjects in pools. DB table `pool_gameobject` is empty.");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -670,7 +670,7 @@ void PoolMgr::LoadFromDB()
|
||||
GameObjectData const* data = sObjectMgr->GetGOData(guid);
|
||||
if (!data)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_gameobject` has a non existing gameobject spawn (GUID: %u) defined for pool id (%u), skipped.", guid, pool_id);
|
||||
TC_LOG_ERROR("sql.sql", "`pool_gameobject` has a non existing gameobject spawn (GUID: %u) defined for pool id (%u), skipped.", guid, pool_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -679,19 +679,19 @@ void PoolMgr::LoadFromDB()
|
||||
goinfo->type != GAMEOBJECT_TYPE_GOOBER &&
|
||||
goinfo->type != GAMEOBJECT_TYPE_FISHINGHOLE)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_gameobject` has a not lootable gameobject spawn (GUID: %u, type: %u) defined for pool id (%u), skipped.", guid, goinfo->type, pool_id);
|
||||
TC_LOG_ERROR("sql.sql", "`pool_gameobject` has a not lootable gameobject spawn (GUID: %u, type: %u) defined for pool id (%u), skipped.", guid, goinfo->type, pool_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (pool_id > max_pool_id)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_gameobject` pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", pool_id);
|
||||
TC_LOG_ERROR("sql.sql", "`pool_gameobject` pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", pool_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (chance < 0 || chance > 100)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_gameobject` has an invalid chance (%f) for gameobject guid (%u) in pool id (%u), skipped.", chance, guid, pool_id);
|
||||
TC_LOG_ERROR("sql.sql", "`pool_gameobject` has an invalid chance (%f) for gameobject guid (%u) in pool id (%u), skipped.", chance, guid, pool_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -707,13 +707,13 @@ void PoolMgr::LoadFromDB()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u gameobject in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
TC_LOG_INFO("server.loading", ">> Loaded %u gameobject in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
}
|
||||
|
||||
// Pool of pools
|
||||
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Mother Pooling Data...");
|
||||
TC_LOG_INFO("server.loading", "Loading Mother Pooling Data...");
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -722,7 +722,7 @@ void PoolMgr::LoadFromDB()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 pools in pools");
|
||||
TC_LOG_INFO("server.loading", ">> Loaded 0 pools in pools");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -737,22 +737,22 @@ void PoolMgr::LoadFromDB()
|
||||
|
||||
if (mother_pool_id > max_pool_id)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_pool` mother_pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", mother_pool_id);
|
||||
TC_LOG_ERROR("sql.sql", "`pool_pool` mother_pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", mother_pool_id);
|
||||
continue;
|
||||
}
|
||||
if (child_pool_id > max_pool_id)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_pool` included pool_id (%u) is out of range compared to max pool id in `pool_template`, skipped.", child_pool_id);
|
||||
TC_LOG_ERROR("sql.sql", "`pool_pool` included pool_id (%u) is out of range compared to max pool id in `pool_template`, skipped.", child_pool_id);
|
||||
continue;
|
||||
}
|
||||
if (mother_pool_id == child_pool_id)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_pool` pool_id (%u) includes itself, dead-lock detected, skipped.", child_pool_id);
|
||||
TC_LOG_ERROR("sql.sql", "`pool_pool` pool_id (%u) includes itself, dead-lock detected, skipped.", child_pool_id);
|
||||
continue;
|
||||
}
|
||||
if (chance < 0 || chance > 100)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_pool` has an invalid chance (%f) for pool id (%u) in mother pool id (%u), skipped.", chance, child_pool_id, mother_pool_id);
|
||||
TC_LOG_ERROR("sql.sql", "`pool_pool` has an invalid chance (%f) for pool id (%u) in mother pool id (%u), skipped.", chance, child_pool_id, mother_pool_id);
|
||||
continue;
|
||||
}
|
||||
PoolTemplateData* pPoolTemplateMother = &mPoolTemplate[mother_pool_id];
|
||||
@@ -782,7 +782,7 @@ void PoolMgr::LoadFromDB()
|
||||
ss << *itr << ' ';
|
||||
ss << "create(s) a circular reference, which can cause the server to freeze.\nRemoving the last link between mother pool "
|
||||
<< poolItr->first << " and child pool " << poolItr->second;
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "%s", ss.str().c_str());
|
||||
TC_LOG_ERROR("sql.sql", "%s", ss.str().c_str());
|
||||
mPoolPoolGroups[poolItr->second].RemoveOneRelation(poolItr->first);
|
||||
mPoolSearchMap.erase(poolItr);
|
||||
--count;
|
||||
@@ -791,11 +791,11 @@ void PoolMgr::LoadFromDB()
|
||||
}
|
||||
}
|
||||
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u pools in mother pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
TC_LOG_INFO("server.loading", ">> Loaded %u pools in mother pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
}
|
||||
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Quest Pooling Data...");
|
||||
TC_LOG_INFO("server.loading", "Loading Quest Pooling Data...");
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -804,7 +804,7 @@ void PoolMgr::LoadFromDB()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 quests in pools");
|
||||
TC_LOG_INFO("server.loading", ">> Loaded 0 quests in pools");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -830,19 +830,19 @@ void PoolMgr::LoadFromDB()
|
||||
Quest const* quest = sObjectMgr->GetQuestTemplate(entry);
|
||||
if (!quest)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_quest` has a non existing quest template (Entry: %u) defined for pool id (%u), skipped.", entry, pool_id);
|
||||
TC_LOG_ERROR("sql.sql", "`pool_quest` has a non existing quest template (Entry: %u) defined for pool id (%u), skipped.", entry, pool_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (pool_id > max_pool_id)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_quest` pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", pool_id);
|
||||
TC_LOG_ERROR("sql.sql", "`pool_quest` pool id (%u) is out of range compared to max pool id in `pool_template`, skipped.", pool_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!quest->IsDailyOrWeekly())
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_quest` has an quest (%u) which is not daily or weekly in pool id (%u), use ExclusiveGroup instead, skipped.", entry, pool_id);
|
||||
TC_LOG_ERROR("sql.sql", "`pool_quest` has an quest (%u) which is not daily or weekly in pool id (%u), use ExclusiveGroup instead, skipped.", entry, pool_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -853,7 +853,7 @@ void PoolMgr::LoadFromDB()
|
||||
|
||||
if (poolTypeMap[pool_id] != currType)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_quest` quest %u is %s but pool (%u) is specified for %s, mixing not allowed, skipped.",
|
||||
TC_LOG_ERROR("sql.sql", "`pool_quest` quest %u is %s but pool (%u) is specified for %s, mixing not allowed, skipped.",
|
||||
entry, currType == QUEST_DAILY ? "QUEST_DAILY" : "QUEST_WEEKLY", pool_id, poolTypeMap[pool_id] == QUEST_DAILY ? "QUEST_DAILY" : "QUEST_WEEKLY");
|
||||
continue;
|
||||
}
|
||||
@@ -863,7 +863,7 @@ void PoolMgr::LoadFromDB()
|
||||
|
||||
if (creBounds.first == creBounds.second && goBounds.first == goBounds.second)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "`pool_quest` lists entry (%u) as member of pool (%u) but is not started anywhere, skipped.", entry, pool_id);
|
||||
TC_LOG_ERROR("sql.sql", "`pool_quest` lists entry (%u) as member of pool (%u) but is not started anywhere, skipped.", entry, pool_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -879,12 +879,12 @@ void PoolMgr::LoadFromDB()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u quests in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
TC_LOG_INFO("server.loading", ">> Loaded %u quests in pools in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
}
|
||||
|
||||
// The initialize method will spawn all pools not in an event and not in another pool, this is why there is 2 left joins with 2 null checks
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Starting objects pooling system...");
|
||||
TC_LOG_INFO("server.loading", "Starting objects pooling system...");
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -894,7 +894,7 @@ void PoolMgr::LoadFromDB()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Pool handling system initialized, 0 pools spawned.");
|
||||
TC_LOG_INFO("server.loading", ">> Pool handling system initialized, 0 pools spawned.");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -910,9 +910,9 @@ void PoolMgr::LoadFromDB()
|
||||
if (pool_pool_id)
|
||||
// The pool is a child pool in pool_pool table. Ideally we should remove it from the pool handler to ensure it never gets spawned,
|
||||
// however that could recursively invalidate entire chain of mother pools. It can be done in the future but for now we'll do nothing.
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Pool Id %u has no equal chance pooled entites defined and explicit chance sum is not 100. This broken pool is a child pool of Id %u and cannot be safely removed.", pool_entry, fields[2].GetUInt32());
|
||||
TC_LOG_ERROR("sql.sql", "Pool Id %u has no equal chance pooled entites defined and explicit chance sum is not 100. This broken pool is a child pool of Id %u and cannot be safely removed.", pool_entry, fields[2].GetUInt32());
|
||||
else
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "Pool Id %u has no equal chance pooled entites defined and explicit chance sum is not 100. The pool will not be spawned.", pool_entry);
|
||||
TC_LOG_ERROR("sql.sql", "Pool Id %u has no equal chance pooled entites defined and explicit chance sum is not 100. The pool will not be spawned.", pool_entry);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -925,7 +925,7 @@ void PoolMgr::LoadFromDB()
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
TC_LOG_DEBUG(LOG_FILTER_POOLSYS, "Pool handling system initialized, %u pools spawned in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
TC_LOG_DEBUG("pool", "Pool handling system initialized, %u pools spawned in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user