mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 07:06:23 +00:00
feat(Core/Logging): improve DB logging (#5437)
This commit is contained in:
@@ -81,7 +81,6 @@ enum WorldBoolConfigs
|
||||
CONFIG_INSTANCE_IGNORE_RAID,
|
||||
CONFIG_INSTANCE_GMSUMMON_PLAYER,
|
||||
CONFIG_INSTANCE_SHARED_ID,
|
||||
CONFIG_GM_LOG_TRADE,
|
||||
CONFIG_ALLOW_GM_GROUP,
|
||||
CONFIG_ALLOW_GM_FRIEND,
|
||||
CONFIG_GM_LOWER_SECURITY,
|
||||
|
||||
@@ -427,6 +427,9 @@ void World::LoadConfigSettings(bool reload)
|
||||
sLog->LoadFromConfig();
|
||||
}
|
||||
|
||||
// Set realm id and enable db logging
|
||||
sLog->SetRealmId(realmID);
|
||||
|
||||
#ifdef ELUNA
|
||||
///- Initialize Lua Engine
|
||||
if (!reload)
|
||||
@@ -926,7 +929,6 @@ void World::LoadConfigSettings(bool reload)
|
||||
|
||||
m_int_configs[CONFIG_GM_LEVEL_IN_GM_LIST] = sConfigMgr->GetOption<int32>("GM.InGMList.Level", SEC_ADMINISTRATOR);
|
||||
m_int_configs[CONFIG_GM_LEVEL_IN_WHO_LIST] = sConfigMgr->GetOption<int32>("GM.InWhoList.Level", SEC_ADMINISTRATOR);
|
||||
m_bool_configs[CONFIG_GM_LOG_TRADE] = sConfigMgr->GetOption<bool>("GM.LogTrade", false);
|
||||
m_int_configs[CONFIG_START_GM_LEVEL] = sConfigMgr->GetOption<int32>("GM.StartLevel", 1);
|
||||
if (m_int_configs[CONFIG_START_GM_LEVEL] < m_int_configs[CONFIG_START_PLAYER_LEVEL])
|
||||
{
|
||||
@@ -2075,15 +2077,6 @@ void World::SetInitialWorldSettings()
|
||||
LOG_INFO("server", "WORLD: World initialized in %u minutes %u seconds", (startupDuration / 60000), ((startupDuration % 60000) / 1000)); // outError for red color in console
|
||||
LOG_INFO("server", " ");
|
||||
|
||||
// possibly enable db logging; avoid massive startup spam by doing it here.
|
||||
if (sConfigMgr->GetOption<bool>("EnableLogDB", false))
|
||||
{
|
||||
LOG_INFO("server", "Enabling database logging...");
|
||||
|
||||
if (uint32 realmId = sConfigMgr->GetOption<uint32>("RealmID", 0)) // 0 reserved for auth
|
||||
sLog->SetRealmId(realmId);
|
||||
}
|
||||
|
||||
if (sConfigMgr->isDryRun())
|
||||
{
|
||||
LOG_INFO("server", "AzerothCore dry run completed, terminating.");
|
||||
|
||||
Reference in New Issue
Block a user