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

@@ -292,7 +292,7 @@ void Battlefield::InitStalker(uint32 entry, float x, float y, float z, float o)
if (Creature* creature = SpawnCreature(entry, x, y, z, o, TEAM_NEUTRAL))
StalkerGuid = creature->GetGUID();
else
LOG_ERROR("server", "Battlefield::InitStalker: could not spawn Stalker (Creature entry %u), zone messeges will be un-available", entry);
LOG_ERROR("bg.battlefield", "Battlefield::InitStalker: could not spawn Stalker (Creature entry %u), zone messeges will be un-available", entry);
}
void Battlefield::KickAfkPlayers()
@@ -582,10 +582,10 @@ BfGraveyard* Battlefield::GetGraveyardById(uint32 id) const
if (m_GraveyardList[id])
return m_GraveyardList[id];
else
LOG_ERROR("server", "Battlefield::GetGraveyardById Id:%u not existed", id);
LOG_ERROR("bg.battlefield", "Battlefield::GetGraveyardById Id:%u not existed", id);
}
else
LOG_ERROR("server", "Battlefield::GetGraveyardById Id:%u cant be found", id);
LOG_ERROR("bg.battlefield", "Battlefield::GetGraveyardById Id:%u cant be found", id);
return nullptr;
}
@@ -677,7 +677,7 @@ void BfGraveyard::SetSpirit(Creature* spirit, TeamId team)
{
if (!spirit)
{
LOG_ERROR("server", "BfGraveyard::SetSpirit: Invalid Spirit.");
LOG_ERROR("bg.battlefield", "BfGraveyard::SetSpirit: Invalid Spirit.");
return;
}
@@ -784,7 +784,7 @@ Creature* Battlefield::SpawnCreature(uint32 entry, float x, float y, float z, fl
Map* map = sMapMgr->CreateBaseMap(m_MapId);
if (!map)
{
LOG_ERROR("server", "Battlefield::SpawnCreature: Can't create creature entry: %u map not found", entry);
LOG_ERROR("bg.battlefield", "Battlefield::SpawnCreature: Can't create creature entry: %u map not found", entry);
return nullptr;
}
@@ -798,7 +798,7 @@ Creature* Battlefield::SpawnCreature(uint32 entry, float x, float y, float z, fl
Creature* creature = new Creature(true);
if (!creature->Create(map->GenerateLowGuid<HighGuid::Unit>(), map, PHASEMASK_NORMAL, entry, 0, x, y, z, o))
{
LOG_ERROR("server", "Battlefield::SpawnCreature: Can't create creature entry: %u", entry);
LOG_ERROR("bg.battlefield", "Battlefield::SpawnCreature: Can't create creature entry: %u", entry);
delete creature;
return nullptr;
}
@@ -830,7 +830,7 @@ GameObject* Battlefield::SpawnGameObject(uint32 entry, float x, float y, float z
if (!go->Create(map->GenerateLowGuid<HighGuid::GameObject>(), entry, map, PHASEMASK_NORMAL, x, y, z, o, G3D::Quat(), 100, GO_STATE_READY))
{
LOG_ERROR("sql.sql", "Battlefield::SpawnGameObject: Gameobject template %u not found in database! Battlefield not created!", entry);
LOG_ERROR("server", "Battlefield::SpawnGameObject: Cannot create gameobject template %u! Battlefield not created!", entry);
LOG_ERROR("bg.battlefield", "Battlefield::SpawnGameObject: Cannot create gameobject template %u! Battlefield not created!", entry);
delete go;
return nullptr;
}
@@ -923,9 +923,7 @@ bool BfCapturePoint::SetCapturePointData(GameObject* capturePoint)
{
ASSERT(capturePoint);
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("bg.battlefield", "Creating capture point %u", capturePoint->GetEntry());
#endif
m_capturePoint = capturePoint->GetGUID();
@@ -933,7 +931,7 @@ bool BfCapturePoint::SetCapturePointData(GameObject* capturePoint)
GameObjectTemplate const* goinfo = capturePoint->GetGOInfo();
if (goinfo->type != GAMEOBJECT_TYPE_CAPTURE_POINT)
{
LOG_ERROR("server", "OutdoorPvP: GO %u is not capture point!", capturePoint->GetEntry());
LOG_ERROR("bg.battlefield", "OutdoorPvP: GO %u is not capture point!", capturePoint->GetEntry());
return false;
}
@@ -1089,7 +1087,7 @@ bool BfCapturePoint::Update(uint32 diff)
if (m_OldState != m_State)
{
//LOG_ERROR("server", "%u->%u", m_OldState, m_State);
//LOG_ERROR("bg.battlefield", "%u->%u", m_OldState, m_State);
if (oldTeam != m_team)
ChangeTeam(oldTeam);
return true;