refactor(Core): Source config more aggressively from env, rephrase a few of the messages (#17114)

* refactor(Core): Let modules source config from env

* create a cache of configs from env

* Update src/common/Configuration/Config.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/common/Configuration/Config.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* enforce new function name

---------

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
Mike Delago
2023-09-20 16:55:46 -04:00
committed by GitHub
parent c4c5e0b438
commit b1c92f498a
3 changed files with 63 additions and 40 deletions

View File

@@ -85,8 +85,6 @@ int main(int argc, char** argv)
if (!sConfigMgr->LoadAppConfigs())
return 1;
std::vector<std::string> overriddenKeys = sConfigMgr->OverrideWithEnvVariablesIfAny();
// Init logging
sLog->RegisterAppender<AppenderDB>();
sLog->Initialize(nullptr);
@@ -103,9 +101,6 @@ int main(int argc, char** argv)
LOG_INFO("server.authserver", "> Using Boost version: {}.{}.{}", BOOST_VERSION / 100000, BOOST_VERSION / 100 % 1000, BOOST_VERSION % 100);
});
for (std::string const& key : overriddenKeys)
LOG_INFO("server.authserver", "Configuration field {} was overridden with environment variable.", key);
OpenSSLCrypto::threadsSetup();
std::shared_ptr<void> opensslHandle(nullptr, [](void*) { OpenSSLCrypto::threadsCleanup(); });