예제 #1
0
    def _parse_tag_color_pair(cls, value):
        tokens = value.split(cls.SEPARATOR_TAG_COLOR)

        if len(tokens) != 2:
            raise Exception("Wrong format of COLOR configuration!")

        tag = tokens[0].strip()
        color = Color.parse(tokens[1].strip())

        return tag, color
예제 #2
0
 def set(self, prop, value):
     if prop == ConfigurationProperty.FILENAME:
         self.filename = value
     elif prop == ConfigurationProperty.FILTER_LIST:
         self.filter_list = self._tokenize(value)
     elif prop == ConfigurationProperty.IGNORE_LIST:
         self.ignore_list = self._tokenize(value)
     elif prop == ConfigurationProperty.NEW_LOG_ENTRY_REGEX:
         self.new_log_entry_regex = value
     elif prop == ConfigurationProperty.DEFAULT_COLOR:
         self.default_color = Color.parse(value)