fix(Core): Improve logging msg when missing .conf file (#2560)
- Fixed typos - Changed outError to outString when it's not an actual error but just a warning - Display "load hardcoded default settings" only when .conf.dist AND .conf are missing
This commit is contained in:
@@ -432,9 +432,14 @@ void World::LoadModuleConfigSettings()
|
|||||||
if (!sConfigMgr->LoadMore(cfg_def_file.c_str()))
|
if (!sConfigMgr->LoadMore(cfg_def_file.c_str()))
|
||||||
{
|
{
|
||||||
sLog->outString();
|
sLog->outString();
|
||||||
sLog->outError("Module config: Invalid or missing configuration dist file : %s", cfg_def_file.c_str());
|
sLog->outError("Module config: Invalid or missing configuration (*.conf.dist) file : %s", cfg_def_file.c_str());
|
||||||
sLog->outError("Module config: Verify that the file exists and has \'[worldserver]' written in the top of the file!");
|
sLog->outError("Module config: Verify that this file exists and has \'[worldserver]' written at the top of the file!");
|
||||||
sLog->outError("Module config: Use default settings!");
|
|
||||||
|
// If .conf exists, it will load it so it will NOT use the default hardcoded settings
|
||||||
|
if (!sConfigMgr->LoadMore(cfg_file.c_str()))
|
||||||
|
{
|
||||||
|
sLog->outError("Module config: Using default hardcoded settings.");
|
||||||
|
}
|
||||||
sLog->outString();
|
sLog->outString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -442,9 +447,7 @@ void World::LoadModuleConfigSettings()
|
|||||||
if (!sConfigMgr->LoadMore(cfg_file.c_str()))
|
if (!sConfigMgr->LoadMore(cfg_file.c_str()))
|
||||||
{
|
{
|
||||||
sLog->outString();
|
sLog->outString();
|
||||||
sLog->outError("Module config: Invalid or missing configuration file : %s", cfg_file.c_str());
|
sLog->outString("Module config: %s not found (or invalid), using default settings from %s", cfg_file.c_str(), cfg_def_file.c_str());
|
||||||
sLog->outError("Module config: Verify that the file exists and has \'[worldserver]' written in the top of the file!");
|
|
||||||
sLog->outError("Module config: Use default settings!");
|
|
||||||
sLog->outString();
|
sLog->outString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user