def _skip_keys()

in aliyun/log/etl_core/trans_comp/trans_json.py [0:0]


    def _skip_keys(self, key, parent_list):
        if (self.include_node and not self.include_node_match(key)) or (
                self.exclude_node and self.exclude_node_match(key)):
            logger.info(u"json_transformer: 'key' {0} is not in include keys '{1}' or in exclude keys '{2}', skip it."
                        .format(key, self.include_node, self.exclude_node))
            return True

        if self.include_path or self.exclude_path:
            path = '.'.join(parent_list) + '.' + key
            if (self.include_path and not self.include_path_match(path)) or (
                    self.exclude_path and self.exclude_path_match(path)):
                logger.info(
                    u"json_transformer: path '{0}' is not in include path '{1}' or in exclude path '{2}', skip it."
                    .format(path, self.include_path, self.exclude_path))
                return True

        return False