mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 23:26:23 +00:00
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:
@@ -58,19 +58,19 @@ InstanceSave* InstanceSaveManager::AddInstanceSave(uint32 mapId, uint32 instance
|
||||
const MapEntry* entry = sMapStore.LookupEntry(mapId);
|
||||
if (!entry)
|
||||
{
|
||||
LOG_ERROR("server", "InstanceSaveManager::AddInstanceSave: wrong mapid = %d, instanceid = %d!", mapId, instanceId);
|
||||
LOG_ERROR("instance.save", "InstanceSaveManager::AddInstanceSave: wrong mapid = %d, instanceid = %d!", mapId, instanceId);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (instanceId == 0)
|
||||
{
|
||||
LOG_ERROR("server", "InstanceSaveManager::AddInstanceSave: mapid = %d, wrong instanceid = %d!", mapId, instanceId);
|
||||
LOG_ERROR("instance.save", "InstanceSaveManager::AddInstanceSave: mapid = %d, wrong instanceid = %d!", mapId, instanceId);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (difficulty >= (entry->IsRaid() ? MAX_RAID_DIFFICULTY : MAX_DUNGEON_DIFFICULTY))
|
||||
{
|
||||
LOG_ERROR("server", "InstanceSaveManager::AddInstanceSave: mapid = %d, instanceid = %d, wrong dificalty %u!", mapId, instanceId, difficulty);
|
||||
LOG_ERROR("instance.save", "InstanceSaveManager::AddInstanceSave: mapid = %d, instanceid = %d, wrong dificalty %u!", mapId, instanceId, difficulty);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -243,8 +243,8 @@ void InstanceSaveManager::LoadInstances()
|
||||
LoadInstanceSaves();
|
||||
LoadCharacterBinds();
|
||||
|
||||
LOG_INFO("server", ">> Loaded instances and binds in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded instances and binds in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void InstanceSaveManager::LoadResetTimes()
|
||||
@@ -267,7 +267,7 @@ void InstanceSaveManager::LoadResetTimes()
|
||||
MapDifficulty const* mapDiff = GetMapDifficultyData(mapid, difficulty);
|
||||
if (!mapDiff)
|
||||
{
|
||||
LOG_ERROR("server", "InstanceSaveManager::LoadResetTimes: invalid mapid(%u)/difficulty(%u) pair in instance_reset!", mapid, difficulty);
|
||||
LOG_ERROR("instance.save", "InstanceSaveManager::LoadResetTimes: invalid mapid(%u)/difficulty(%u) pair in instance_reset!", mapid, difficulty);
|
||||
CharacterDatabase.DirectPExecute("DELETE FROM instance_reset WHERE mapid = '%u' AND difficulty = '%u'", mapid, difficulty);
|
||||
continue;
|
||||
}
|
||||
@@ -444,7 +444,7 @@ void InstanceSaveManager::Update()
|
||||
// pussywizard: send updated calendar and raid info
|
||||
if (resetOccurred)
|
||||
{
|
||||
LOG_INFO("server", "Instance ID reset occurred, sending updated calendar and raid info to all players!");
|
||||
LOG_INFO("instance.save", "Instance ID reset occurred, sending updated calendar and raid info to all players!");
|
||||
WorldPacket dummy;
|
||||
for (SessionMap::const_iterator itr = sWorld->GetAllSessions().begin(); itr != sWorld->GetAllSessions().end(); ++itr)
|
||||
if (Player* plr = itr->second->GetPlayer())
|
||||
@@ -518,7 +518,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b
|
||||
MapDifficulty const* mapDiff = GetMapDifficultyData(mapid, difficulty);
|
||||
if (!mapDiff || !mapDiff->resetTime)
|
||||
{
|
||||
LOG_ERROR("server", "InstanceSaveManager::ResetOrWarnAll: not valid difficulty or no reset delay for map %d", mapid);
|
||||
LOG_ERROR("instance.save", "InstanceSaveManager::ResetOrWarnAll: not valid difficulty or no reset delay for map %d", mapid);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,9 +43,7 @@ void InstanceScript::HandleGameObject(ObjectGuid GUID, bool open, GameObject* go
|
||||
go->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
|
||||
else
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("scripts.ai", "TSCR: InstanceScript: HandleGameObject failed");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,9 +65,7 @@ void InstanceScript::LoadMinionData(const MinionData* data)
|
||||
|
||||
++data;
|
||||
}
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("scripts.ai", "InstanceScript::LoadMinionData: " UI64FMTD " minions loaded.", uint64(minions.size()));
|
||||
#endif
|
||||
}
|
||||
|
||||
void InstanceScript::LoadDoorData(const DoorData* data)
|
||||
@@ -81,9 +77,7 @@ void InstanceScript::LoadDoorData(const DoorData* data)
|
||||
|
||||
++data;
|
||||
}
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("scripts.ai", "InstanceScript::LoadDoorData: " UI64FMTD " doors loaded.", uint64(doors.size()));
|
||||
#endif
|
||||
}
|
||||
|
||||
void InstanceScript::UpdateMinionState(Creature* minion, EncounterState state)
|
||||
@@ -201,7 +195,6 @@ bool InstanceScript::SetBossState(uint32 id, EncounterState state)
|
||||
if (bossInfo->state == TO_BE_DECIDED) // loading
|
||||
{
|
||||
bossInfo->state = state;
|
||||
//LOG_ERROR("server", "Inialize boss %u state as %u.", id, (uint32)state);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
@@ -271,7 +264,7 @@ void InstanceScript::DoUseDoorOrButton(ObjectGuid uiGuid, uint32 uiWithRestoreTi
|
||||
go->ResetDoorOrButton();
|
||||
}
|
||||
else
|
||||
LOG_ERROR("server", "SD2: Script call DoUseDoorOrButton, but gameobject entry %u is type %u.", go->GetEntry(), go->GetGoType());
|
||||
LOG_ERROR("scripts.ai", "SD2: Script call DoUseDoorOrButton, but gameobject entry %u is type %u.", go->GetEntry(), go->GetGoType());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,9 +296,7 @@ void InstanceScript::DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData)
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("scripts.ai", "TSCR: DoUpdateWorldState attempt send data but no players in map.");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -391,7 +382,7 @@ void InstanceScript::DoCastSpellOnPlayers(uint32 spell)
|
||||
|
||||
bool InstanceScript::CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/ /*= nullptr*/, uint32 /*miscvalue1*/ /*= 0*/)
|
||||
{
|
||||
LOG_ERROR("server", "Achievement system call InstanceScript::CheckAchievementCriteriaMeet but instance script for map %u not have implementation for achievement criteria %u",
|
||||
LOG_ERROR("scripts.ai", "Achievement system call InstanceScript::CheckAchievementCriteriaMeet but instance script for map %u not have implementation for achievement criteria %u",
|
||||
instance->GetId(), criteria_id);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#define OUT_SAVE_INST_DATA_COMPLETE LOG_DEBUG("scripts.ai", "TSCR: Saving Instance Data for Instance %s (Map %d, Instance Id %d) completed.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
|
||||
#define OUT_LOAD_INST_DATA(a) LOG_DEBUG("scripts.ai", "TSCR: Loading Instance Data for Instance %s (Map %d, Instance Id %d). Input is '%s'", instance->GetMapName(), instance->GetId(), instance->GetInstanceId(), a)
|
||||
#define OUT_LOAD_INST_DATA_COMPLETE LOG_DEBUG("scripts.ai", "TSCR: Instance Data Load for Instance %s (Map %d, Instance Id: %d) is complete.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
|
||||
#define OUT_LOAD_INST_DATA_FAIL LOG_ERROR("server", "TSCR: Unable to load Instance Data for Instance %s (Map %d, Instance Id: %d).", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
|
||||
#define OUT_LOAD_INST_DATA_FAIL LOG_ERROR("scripts.ai", "TSCR: Unable to load Instance Data for Instance %s (Map %d, Instance Id: %d).", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
|
||||
|
||||
class Map;
|
||||
class Unit;
|
||||
|
||||
Reference in New Issue
Block a user