feat(Core/Config): rework config and delete ACE inherited (#4608)

This commit is contained in:
Kargatum
2021-02-28 20:37:03 +07:00
committed by GitHub
parent c2f274e06d
commit dbefa17a53
36 changed files with 1340 additions and 816 deletions

View File

@@ -59,7 +59,7 @@ void usage(const char* prog)
extern int main(int argc, char** argv)
{
///- Command line parsing to get the configuration file name
char const* configFile = _ACORE_CORE_CONFIG;
std::string configFile = sConfigMgr->GetConfigPath() + std::string(_ACORE_CORE_CONFIG);
int c = 1;
while (c < argc)
{
@@ -116,12 +116,13 @@ extern int main(int argc, char** argv)
++c;
}
sConfigMgr->SetConfigList(std::string(configFile), std::string(CONFIG_FILE_LIST));
// Add file and args in config
sConfigMgr->Configure(configFile, std::vector<std::string>(argv, argv + argc), CONFIG_FILE_LIST);
if (!sConfigMgr->LoadAppConfigs())
return 1;
sLog->outString("Using configuration file %s.", configFile);
sLog->outString("Using configuration file %s.", configFile.c_str());
sLog->outString("Using SSL version: %s (library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
sLog->outString("Using ACE version: %s", ACE_VERSION);