summaryrefslogtreecommitdiff
path: root/src/common/Configuration/Config.cpp
diff options
context:
space:
mode:
authorKargatum <dowlandtop@yandex.com>2021-04-17 16:20:07 +0700
committerGitHub <noreply@github.com>2021-04-17 11:20:07 +0200
commit4af4cbd3d966a05c584f4b6c63f69517dad0677d (patch)
tree1c4329a0c64233aaa033ac3788c1e4ddc9422eb9 /src/common/Configuration/Config.cpp
parentb2861be1cd623182fd9e900c9ccfe8e063f28d8e (diff)
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
Diffstat (limited to 'src/common/Configuration/Config.cpp')
-rw-r--r--src/common/Configuration/Config.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/common/Configuration/Config.cpp b/src/common/Configuration/Config.cpp
index 205ea26c06..c191f1be9c 100644
--- a/src/common/Configuration/Config.cpp
+++ b/src/common/Configuration/Config.cpp
@@ -27,7 +27,7 @@ namespace
{
if (!replace)
{
- sLog->outError("> Config: Option '%s' is exist! Option key - '%s'", optionName.c_str(), itr->second.c_str());
+ LOG_ERROR("server", "> Config: Option '%s' is exist! Option key - '%s'", optionName.c_str(), itr->second.c_str());
return;
}
@@ -92,7 +92,7 @@ namespace
}
catch (const std::exception& e)
{
- sLog->outError("> Config: %s", e.what());
+ LOG_ERROR("server", "> Config: %s", e.what());
}
return false;
@@ -134,7 +134,7 @@ T ConfigMgr::GetValueDefault(std::string const& name, T const& def, bool showLog
{
if (showLogs)
{
- sLog->outError("> Config: Missing name %s in config, add \"%s = %s\"",
+ LOG_ERROR("server", "> Config: Missing name %s in config, add \"%s = %s\"",
name.c_str(), name.c_str(), acore::ToString(def).c_str());
}
@@ -146,7 +146,7 @@ T ConfigMgr::GetValueDefault(std::string const& name, T const& def, bool showLog
{
if (showLogs)
{
- sLog->outError("> Config: Bad value defined for name '%s', going to use '%s' instead",
+ LOG_ERROR("server", "> Config: Bad value defined for name '%s', going to use '%s' instead",
name.c_str(), acore::ToString(def).c_str());
}
@@ -164,7 +164,7 @@ std::string ConfigMgr::GetValueDefault<std::string>(std::string const& name, std
{
if (showLogs)
{
- sLog->outError("> Config: Missing name %s in config, add \"%s = %s\"",
+ LOG_ERROR("server", "> Config: Missing name %s in config, add \"%s = %s\"",
name.c_str(), name.c_str(), def.c_str());
}
@@ -190,7 +190,7 @@ bool ConfigMgr::GetOption<bool>(std::string const& name, bool const& def, bool s
{
if (showLogs)
{
- sLog->outError("> Config: Bad value defined for name '%s', going to use '%s' instead",
+ LOG_ERROR("server", "> Config: Bad value defined for name '%s', going to use '%s' instead",
name.c_str(), def ? "true" : "false");
}
@@ -299,13 +299,13 @@ bool ConfigMgr::LoadModulesConfigs()
return false;
// Print modules configurations
- sLog->outString();
- sLog->outString("Using modules configuration:");
+ LOG_INFO("server", " ");
+ LOG_INFO("server", "Using modules configuration:");
for (auto const& itr : moduleConfigFiles)
- sLog->outString("> %s", itr.c_str());
+ LOG_INFO("server", "> %s", itr.c_str());
- sLog->outString("");
+ LOG_INFO("server", " ");
return true;
}