chore(Core/Logging): replace most server loggers (#5726)

* chore(Core/Logging): replace most server loggers

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
Kargatum
2021-06-21 08:07:12 +07:00
committed by GitHub
parent 9f80a592bb
commit 5787d00d54
199 changed files with 2312 additions and 4487 deletions

View File

@@ -29,8 +29,8 @@ void LootItemStorage::LoadStorageFromDB()
PreparedQueryResult result = CharacterDatabase.Query(stmt);
if (!result)
{
LOG_INFO("server", ">> Loaded 0 stored items!");
LOG_INFO("server", " ");
LOG_INFO("server.loading", ">> Loaded 0 stored items!");
LOG_INFO("server.loading", " ");
return;
}
@@ -46,8 +46,8 @@ void LootItemStorage::LoadStorageFromDB()
++count;
} while (result->NextRow());
LOG_INFO("server", ">> Loaded %d stored items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server", " ");
LOG_INFO("server.loading", ">> Loaded %d stored items in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loading", " ");
}
void LootItemStorage::RemoveEntryFromDB(ObjectGuid containerGUID, uint32 itemid, uint32 count)

View File

@@ -160,7 +160,7 @@ uint32 LootStore::LoadLootTable()
if (lootmode == 0)
{
LOG_ERROR("server", "Table '%s' Entry %d Item %d: LootMode is equal to 0, item will never drop - setting mode 1", GetName(), entry, item);
LOG_ERROR("sql.sql", "Table '%s' Entry %d Item %d: LootMode is equal to 0, item will never drop - setting mode 1", GetName(), entry, item);
lootmode = 1;
}
@@ -1647,7 +1647,7 @@ bool LootTemplate::addConditionItem(Condition* cond)
{
if (!cond || !cond->isLoaded())//should never happen, checked at loading
{
LOG_ERROR("server", "LootTemplate::addConditionItem: condition is null");
LOG_ERROR("condition", "LootTemplate::addConditionItem: condition is null");
return false;
}
@@ -1712,7 +1712,7 @@ bool LootTemplate::isReference(uint32 id) const
void LoadLootTemplates_Creature()
{
LOG_INFO("server", "Loading creature loot templates...");
LOG_INFO("server.loading", "Loading creature loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1739,16 +1739,16 @@ void LoadLootTemplates_Creature()
LootTemplates_Creature.ReportUnusedIds(lootIdSet);
if (count)
LOG_INFO("server", ">> Loaded %u creature loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loading", ">> Loaded %u creature loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 creature loot templates. DB table `creature_loot_template` is empty");
LOG_INFO("server", " ");
LOG_INFO("server.loading", " ");
}
void LoadLootTemplates_Disenchant()
{
LOG_INFO("server", "Loading disenchanting loot templates...");
LOG_INFO("server.loading", "Loading disenchanting loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1774,15 +1774,15 @@ void LoadLootTemplates_Disenchant()
LootTemplates_Disenchant.ReportUnusedIds(lootIdSet);
if (count)
LOG_INFO("server", ">> Loaded %u disenchanting loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loading", ">> Loaded %u disenchanting loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 disenchanting loot templates. DB table `disenchant_loot_template` is empty");
LOG_INFO("server", " ");
LOG_INFO("server.loading", " ");
}
void LoadLootTemplates_Fishing()
{
LOG_INFO("server", "Loading fishing loot templates...");
LOG_INFO("server.loading", "Loading fishing loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1799,16 +1799,16 @@ void LoadLootTemplates_Fishing()
LootTemplates_Fishing.ReportUnusedIds(lootIdSet);
if (count)
LOG_INFO("server", ">> Loaded %u fishing loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loading", ">> Loaded %u fishing loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 fishing loot templates. DB table `fishing_loot_template` is empty");
LOG_INFO("server", " ");
LOG_INFO("server.loading", " ");
}
void LoadLootTemplates_Gameobject()
{
LOG_INFO("server", "Loading gameobject loot templates...");
LOG_INFO("server.loading", "Loading gameobject loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1835,16 +1835,16 @@ void LoadLootTemplates_Gameobject()
LootTemplates_Gameobject.ReportUnusedIds(lootIdSet);
if (count)
LOG_INFO("server", ">> Loaded %u gameobject loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loading", ">> Loaded %u gameobject loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 gameobject loot templates. DB table `gameobject_loot_template` is empty");
LOG_INFO("server", " ");
LOG_INFO("server.loading", " ");
}
void LoadLootTemplates_Item()
{
LOG_INFO("server", "Loading item loot templates...");
LOG_INFO("server.loading", "Loading item loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1861,16 +1861,16 @@ void LoadLootTemplates_Item()
LootTemplates_Item.ReportUnusedIds(lootIdSet);
if (count)
LOG_INFO("server", ">> Loaded %u item loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loading", ">> Loaded %u item loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 item loot templates. DB table `item_loot_template` is empty");
LOG_INFO("server", " ");
LOG_INFO("server.loading", " ");
}
void LoadLootTemplates_Milling()
{
LOG_INFO("server", "Loading milling loot templates...");
LOG_INFO("server.loading", "Loading milling loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1892,16 +1892,16 @@ void LoadLootTemplates_Milling()
LootTemplates_Milling.ReportUnusedIds(lootIdSet);
if (count)
LOG_INFO("server", ">> Loaded %u milling loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loading", ">> Loaded %u milling loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 milling loot templates. DB table `milling_loot_template` is empty");
LOG_INFO("server", " ");
LOG_INFO("server.loading", " ");
}
void LoadLootTemplates_Pickpocketing()
{
LOG_INFO("server", "Loading pickpocketing loot templates...");
LOG_INFO("server.loading", "Loading pickpocketing loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1928,16 +1928,16 @@ void LoadLootTemplates_Pickpocketing()
LootTemplates_Pickpocketing.ReportUnusedIds(lootIdSet);
if (count)
LOG_INFO("server", ">> Loaded %u pickpocketing loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loading", ">> Loaded %u pickpocketing loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 pickpocketing loot templates. DB table `pickpocketing_loot_template` is empty");
LOG_INFO("server", " ");
LOG_INFO("server.loading", " ");
}
void LoadLootTemplates_Prospecting()
{
LOG_INFO("server", "Loading prospecting loot templates...");
LOG_INFO("server.loading", "Loading prospecting loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1959,16 +1959,16 @@ void LoadLootTemplates_Prospecting()
LootTemplates_Prospecting.ReportUnusedIds(lootIdSet);
if (count)
LOG_INFO("server", ">> Loaded %u prospecting loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loading", ">> Loaded %u prospecting loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 prospecting loot templates. DB table `prospecting_loot_template` is empty");
LOG_INFO("server", " ");
LOG_INFO("server.loading", " ");
}
void LoadLootTemplates_Mail()
{
LOG_INFO("server", "Loading mail loot templates...");
LOG_INFO("server.loading", "Loading mail loot templates...");
uint32 oldMSTime = getMSTime();
@@ -1985,16 +1985,16 @@ void LoadLootTemplates_Mail()
LootTemplates_Mail.ReportUnusedIds(lootIdSet);
if (count)
LOG_INFO("server", ">> Loaded %u mail loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loading", ">> Loaded %u mail loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 mail loot templates. DB table `mail_loot_template` is empty");
LOG_INFO("server", " ");
LOG_INFO("server.loading", " ");
}
void LoadLootTemplates_Skinning()
{
LOG_INFO("server", "Loading skinning loot templates...");
LOG_INFO("server.loading", "Loading skinning loot templates...");
uint32 oldMSTime = getMSTime();
@@ -2021,16 +2021,16 @@ void LoadLootTemplates_Skinning()
LootTemplates_Skinning.ReportUnusedIds(lootIdSet);
if (count)
LOG_INFO("server", ">> Loaded %u skinning loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loading", ">> Loaded %u skinning loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 skinning loot templates. DB table `skinning_loot_template` is empty");
LOG_INFO("server", " ");
LOG_INFO("server.loading", " ");
}
void LoadLootTemplates_Spell()
{
LOG_INFO("server", "Loading spell loot templates...");
LOG_INFO("server.loading", "Loading spell loot templates...");
uint32 oldMSTime = getMSTime();
@@ -2065,15 +2065,15 @@ void LoadLootTemplates_Spell()
LootTemplates_Spell.ReportUnusedIds(lootIdSet);
if (count)
LOG_INFO("server", ">> Loaded %u spell loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loading", ">> Loaded %u spell loot templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
else
LOG_ERROR("sql.sql", ">> Loaded 0 spell loot templates. DB table `spell_loot_template` is empty");
LOG_INFO("server", " ");
LOG_INFO("server.loading", " ");
}
void LoadLootTemplates_Reference()
{
LOG_INFO("server", "Loading reference loot templates...");
LOG_INFO("server.loading", "Loading reference loot templates...");
uint32 oldMSTime = getMSTime();
@@ -2096,6 +2096,6 @@ void LoadLootTemplates_Reference()
// output error for any still listed ids (not referenced from any loot table)
LootTemplates_Reference.ReportUnusedIds(lootIdSet);
LOG_INFO("server", ">> Loaded refence loot templates in %u ms", GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server", " ");
LOG_INFO("server.loading", ">> Loaded refence loot templates in %u ms", GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server.loading", " ");
}