mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
feat(Core/Logging): rework logging (#4692)
* feat(Core/Logging): rework logging * correct level for sql.sql * del unused config options * Correct build * correct after merge * whitespace 20:29:37 1. 'Player.cpp'. Replace (1) 20:29:37 2. 'ObjectMgr.cpp'. Replace (3) * 1 * correct logging * correct affter merge * 1 * 2 * LOG_LEVEL_WARN * #include "AppenderDB.h" * 3 * 4 * 5 * 1. 'WorldSocket.cpp'. Replace (1) * 6 * 1
This commit is contained in:
@@ -312,7 +312,7 @@ public:
|
||||
_mapEntry = sMapStore.LookupEntry(_mapId);
|
||||
|
||||
if (!_mapEntry)
|
||||
sLog->outError("Invalid MapScript for %u; no such map ID.", _mapId);
|
||||
LOG_ERROR("server", "Invalid MapScript for %u; no such map ID.", _mapId);
|
||||
}
|
||||
|
||||
// Gets the MapEntry structure associated with this script. Can return nullptr.
|
||||
@@ -353,7 +353,7 @@ public:
|
||||
checkMap();
|
||||
|
||||
if (GetEntry() && !GetEntry()->IsWorldMap())
|
||||
sLog->outError("WorldMapScript for map %u is invalid.", GetEntry()->MapID);
|
||||
LOG_ERROR("server", "WorldMapScript for map %u is invalid.", GetEntry()->MapID);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -370,7 +370,7 @@ public:
|
||||
checkMap();
|
||||
|
||||
if (GetEntry() && !GetEntry()->IsDungeon())
|
||||
sLog->outError("InstanceMapScript for map %u is invalid.", GetEntry()->MapID);
|
||||
LOG_ERROR("server", "InstanceMapScript for map %u is invalid.", GetEntry()->MapID);
|
||||
}
|
||||
|
||||
// Gets an InstanceScript object for this instance.
|
||||
@@ -390,7 +390,7 @@ public:
|
||||
checkMap();
|
||||
|
||||
if (GetEntry() && !GetEntry()->IsBattleground())
|
||||
sLog->outError("BattlegroundMapScript for map %u is invalid.", GetEntry()->MapID);
|
||||
LOG_ERROR("server", "BattlegroundMapScript for map %u is invalid.", GetEntry()->MapID);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1990,7 +1990,7 @@ public:
|
||||
else
|
||||
{
|
||||
// If the script is already assigned -> delete it!
|
||||
sLog->outError("Script named '%s' is already assigned (two or more scripts have the same name), so the script can't work, aborting...",
|
||||
LOG_ERROR("server", "Script named '%s' is already assigned (two or more scripts have the same name), so the script can't work, aborting...",
|
||||
script->GetName().c_str());
|
||||
|
||||
ABORT(); // Error that should be fixed ASAP.
|
||||
@@ -2000,7 +2000,7 @@ public:
|
||||
{
|
||||
// The script uses a script name from database, but isn't assigned to anything.
|
||||
if (script->GetName().find("Smart") == std::string::npos)
|
||||
sLog->outErrorDb("Script named '%s' is not assigned in the database.",
|
||||
LOG_ERROR("sql.sql", "Script named '%s' is not assigned in the database.",
|
||||
script->GetName().c_str());
|
||||
}
|
||||
}
|
||||
@@ -2034,7 +2034,7 @@ private:
|
||||
{
|
||||
if (it->second == script)
|
||||
{
|
||||
sLog->outError("Script '%s' has same memory pointer as '%s'.",
|
||||
LOG_ERROR("server", "Script '%s' has same memory pointer as '%s'.",
|
||||
script->GetName().c_str(), it->second->GetName().c_str());
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user