zoukankan      html  css  js  c++  java
  • 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;
    }
    大悲无泪--大悟无言--大笑无声
  • 相关阅读:
    继承—泛型
    单例模式
    继承 4—Monkey
    继承 3—A B E
    继承 2—people
    继承 1—Mucic
    面向对象—汽车
    面向对象—封装—汽车
    Linux下查看CPU型号,内存大小,硬盘空间的命令
    redis源码——数据结构与对象
  • 原文地址:https://www.cnblogs.com/dpf-learn/p/14611130.html
Copyright © 2011-2022 走看看