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:
Kargatum
2021-04-17 16:20:07 +07:00
committed by GitHub
parent b2861be1cd
commit 4af4cbd3d9
246 changed files with 7413 additions and 6807 deletions

View File

@@ -44,7 +44,7 @@ void TransportMgr::LoadTransportTemplates()
if (!result)
{
sLog->outString(">> Loaded 0 transport templates. DB table `gameobject_template` has no transports!");
LOG_INFO("server", ">> Loaded 0 transport templates. DB table `gameobject_template` has no transports!");
return;
}
@@ -57,13 +57,13 @@ void TransportMgr::LoadTransportTemplates()
GameObjectTemplate const* goInfo = sObjectMgr->GetGameObjectTemplate(entry);
if (goInfo == nullptr)
{
sLog->outError("Transport %u has no associated GameObjectTemplate from `gameobject_template` , skipped.", entry);
LOG_ERROR("server", "Transport %u has no associated GameObjectTemplate from `gameobject_template` , skipped.", entry);
continue;
}
if (goInfo->moTransport.taxiPathId >= sTaxiPathNodesByPath.size())
{
sLog->outError("Transport %u (name: %s) has an invalid path specified in `gameobject_template`.`data0` (%u) field, skipped.", entry, goInfo->name.c_str(), goInfo->moTransport.taxiPathId);
LOG_ERROR("server", "Transport %u (name: %s) has an invalid path specified in `gameobject_template`.`data0` (%u) field, skipped.", entry, goInfo->name.c_str(), goInfo->moTransport.taxiPathId);
continue;
}
@@ -79,8 +79,8 @@ void TransportMgr::LoadTransportTemplates()
++count;
} while (result->NextRow());
sLog->outString(">> Loaded %u transport templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
LOG_INFO("server", ">> Loaded %u transport templates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server", " ");
}
class SplineRawInitializer
@@ -361,7 +361,7 @@ MotionTransport* TransportMgr::CreateTransport(uint32 entry, uint32 guid /*= 0*/
TransportTemplate const* tInfo = GetTransportTemplate(entry);
if (!tInfo)
{
sLog->outError("Transport %u will not be loaded, `transport_template` missing", entry);
LOG_ERROR("server", "Transport %u will not be loaded, `transport_template` missing", entry);
return nullptr;
}
@@ -388,7 +388,7 @@ MotionTransport* TransportMgr::CreateTransport(uint32 entry, uint32 guid /*= 0*/
{
if (mapEntry->Instanceable() != tInfo->inInstance)
{
sLog->outError("Transport %u (name: %s) attempted creation in instance map (id: %u) but it is not an instanced transport!", entry, trans->GetName().c_str(), mapId);
LOG_ERROR("server", "Transport %u (name: %s) attempted creation in instance map (id: %u) but it is not an instanced transport!", entry, trans->GetName().c_str(), mapId);
delete trans;
return nullptr;
}
@@ -432,8 +432,8 @@ void TransportMgr::SpawnContinentTransports()
} while (result->NextRow());
}
sLog->outString(">> Spawned %u continent motion transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
LOG_INFO("server", ">> Spawned %u continent motion transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server", " ");
if (sWorld->getBoolConfig(CONFIG_ENABLE_CONTINENT_TRANSPORT_PRELOADING))
{
@@ -460,7 +460,7 @@ void TransportMgr::SpawnContinentTransports()
} while (result->NextRow());
}
sLog->outString(">> Preloaded grids for %u continent static transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
LOG_INFO("server", ">> Preloaded grids for %u continent static transports in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
}
}