mem
void EnvConfigParser::ParseMemSetting(const nlohmann::json &content) {
auto sys_setting = content.find(kSysSettings);
if (sys_setting == content.end()) {
MS_LOG(WARNING) << "The '" << kSysSettings << "' not exists. Please check the config file '" << config_file_
<< "' set by 'env_config_path' in context.";
return;
}
has_sys_setting_ = true;
auto sys_enable = CheckJsonKeyExist(*sys_setting, kSysSettings, kSysEnable);
if (sys_enable.has_value()) {
ParseSysEnable(**sys_enable);
}
}
void EnvConfigParser::ParseSysEnable(const nlohmann::json &content) {
if (!content.is_boolean()) {
MS_LOG(WARNING) << "Json parse failed. 'enable' in " << kSysSettings << " should be boolean."
<< " Please check the config file '" << config_file_ << "' set by 'env_config_path' in context.";
sys_enabled_ = false;
return;
}
sys_enabled_ = content;
}
大悲无泪--大悟无言--大笑无声