mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 07:06: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:
@@ -183,7 +183,7 @@ uint32 DBCFileCount = 0;
|
||||
|
||||
static bool LoadDBC_assert_print(uint32 fsize, uint32 rsize, const std::string& filename)
|
||||
{
|
||||
LOG_ERROR("server", "Size of '%s' set by format string (%u) not equal size of C++ structure (%u).", filename.c_str(), fsize, rsize);
|
||||
LOG_ERROR("dbc", "Size of '%s' set by format string (%u) not equal size of C++ structure (%u).", filename.c_str(), fsize, rsize);
|
||||
|
||||
// ASSERT must fail after function call
|
||||
return false;
|
||||
@@ -565,7 +565,7 @@ void LoadDBCStores(const std::string& dataPath)
|
||||
// error checks
|
||||
if (bad_dbc_files.size() >= DBCFileCount)
|
||||
{
|
||||
LOG_ERROR("server", "Incorrect DataDir value in worldserver.conf or ALL required *.dbc files (%d) not found by path: %sdbc", DBCFileCount, dataPath.c_str());
|
||||
LOG_ERROR("dbc", "Incorrect DataDir value in worldserver.conf or ALL required *.dbc files (%d) not found by path: %sdbc", DBCFileCount, dataPath.c_str());
|
||||
exit(1);
|
||||
}
|
||||
else if (!bad_dbc_files.empty())
|
||||
@@ -574,7 +574,7 @@ void LoadDBCStores(const std::string& dataPath)
|
||||
for (StoreProblemList::iterator i = bad_dbc_files.begin(); i != bad_dbc_files.end(); ++i)
|
||||
str += *i + "\n";
|
||||
|
||||
LOG_ERROR("server", "Some required *.dbc files (%u from %d) not found or not compatible:\n%s", (uint32)bad_dbc_files.size(), DBCFileCount, str.c_str());
|
||||
LOG_ERROR("dbc", "Some required *.dbc files (%u from %d) not found or not compatible:\n%s", (uint32)bad_dbc_files.size(), DBCFileCount, str.c_str());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -586,14 +586,14 @@ void LoadDBCStores(const std::string& dataPath)
|
||||
!sMapStore.LookupEntry(724) || // last map added in 3.3.5a
|
||||
!sSpellStore.LookupEntry(80864) ) // last client known item added in 3.3.5a
|
||||
{
|
||||
LOG_ERROR("server", "You have _outdated_ DBC data. Please extract correct versions from current using client.");
|
||||
LOG_ERROR("dbc", "You have _outdated_ DBC data. Please extract correct versions from current using client.");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
LoadM2Cameras(dataPath);
|
||||
|
||||
LOG_INFO("server", ">> Initialized %d data stores in %u ms", DBCFileCount, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Initialized %d data stores in %u ms", DBCFileCount, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
// Convert the geomoetry from a spline value, to an actual WoW XYZ
|
||||
@@ -775,7 +775,7 @@ bool readCamera(M2Camera const* cam, uint32 buffSize, M2Header const* header, Ci
|
||||
void LoadM2Cameras(const std::string& dataPath)
|
||||
{
|
||||
sFlyByCameraStore.clear();
|
||||
LOG_INFO("server", ">> Loading Cinematic Camera files");
|
||||
LOG_INFO("server.loading", ">> Loading Cinematic Camera files");
|
||||
|
||||
uint32 oldMSTime = getMSTime();
|
||||
for (uint32 i = 0; i < sCinematicCameraStore.GetNumRows(); ++i)
|
||||
@@ -813,7 +813,7 @@ void LoadM2Cameras(const std::string& dataPath)
|
||||
// Reject if not at least the size of the header
|
||||
if (static_cast<uint32>(fileSize) < sizeof(M2Header))
|
||||
{
|
||||
LOG_ERROR("server", "Camera file %s is damaged. File is smaller than header size", filename.c_str());
|
||||
LOG_ERROR("dbc", "Camera file %s is damaged. File is smaller than header size", filename.c_str());
|
||||
m2file.close();
|
||||
continue;
|
||||
}
|
||||
@@ -827,7 +827,7 @@ void LoadM2Cameras(const std::string& dataPath)
|
||||
// Check file has correct magic (MD20)
|
||||
if (strcmp(fileCheck, "MD20"))
|
||||
{
|
||||
LOG_ERROR("server", "Camera file %s is damaged. File identifier not found", filename.c_str());
|
||||
LOG_ERROR("dbc", "Camera file %s is damaged. File identifier not found", filename.c_str());
|
||||
m2file.close();
|
||||
continue;
|
||||
}
|
||||
@@ -847,7 +847,7 @@ void LoadM2Cameras(const std::string& dataPath)
|
||||
|
||||
if (header->ofsCameras + sizeof(M2Camera) > static_cast<uint32>(fileSize))
|
||||
{
|
||||
LOG_ERROR("server", "Camera file %s is damaged. Camera references position beyond file end", filename.c_str());
|
||||
LOG_ERROR("dbc", "Camera file %s is damaged. Camera references position beyond file end", filename.c_str());
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -855,11 +855,11 @@ void LoadM2Cameras(const std::string& dataPath)
|
||||
M2Camera const* cam = reinterpret_cast<M2Camera const*>(buffer.data() + header->ofsCameras);
|
||||
if (!readCamera(cam, fileSize, header, dbcentry))
|
||||
{
|
||||
LOG_ERROR("server", "Camera file %s is damaged. Camera references position beyond file end", filename.c_str());
|
||||
LOG_ERROR("dbc", "Camera file %s is damaged. Camera references position beyond file end", filename.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
LOG_INFO("server", ">> Loaded %u cinematic waypoint sets in %u ms", (uint32)sFlyByCameraStore.size(), GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", ">> Loaded %u cinematic waypoint sets in %u ms", (uint32)sFlyByCameraStore.size(), GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
SimpleFactionsList const* GetFactionTeamList(uint32 faction)
|
||||
|
||||
Reference in New Issue
Block a user