示例#1
0
    def setUp(self):
        config_paths = []
        if self.config_path:
            config_paths.append(self.config_path)
        proto_conf = Config()
        proto_conf.LogConfig = Config()
        if self.debug:
            proto_conf.LogConfig.stream_log_level = "DEBUG"
        else:
            proto_conf.LogConfig.stream_log_level = "WARNING"
        proto_conf.BaseConfig = Config()
        proto_conf.BaseConfig.config_dir = self.config_dir
        proto_conf.BaseConfig.config_path = self.config_path

        self.conf = load_config(shlex.split(self.override_args), proto_conf)

        setup_logging(**dict(self.conf.LogConfig))

        PKG_LOGGER.debug("Completed setUp of class %s",
                         self.__class__.__name__)