          logger.debug("Initialized %s", self.__class__.__name__)
  
      def write(self, string):
          """ Capture stdout/stderr """
          self.console.insert(tk.END, string, self.get_tag(string))
          self.console.see(tk.END)
 
</s> remove         self.console.insert(tk.END, string, self.out_type)
        self.console.tag_config(self.out_type, foreground=self.color)
 </s> add         self.console.insert(tk.END, string, self.get_tag(string)) </s> remove         self.color = ("black" if out_type == "stdout" else "red")
 </s> add         self.recolor = re.compile(r".+?(\s\d+:\d+:\d+\s)(?P<lvl>[A-Z]+)\s") </s> remove         self.console.config(width=100, height=6, bg="gray90", fg="black")
 </s> add         self.console.config(width=100, height=6, bg="#1E1E1E", fg="white")
    def get_tag(self, string):
        """ Set the tag based on regex of log output """
        if self.out_type == "stderr":
            # Output all stderr in red
            return self.out_type

        output = self.recolor.match(string)
        if not output:
            return "default"
        tag = output.groupdict()["lvl"].strip().lower()
        return tag

          logger.debug("Initialized %s", self.__class__.__name__)
  
    def get_tag(self, string):
        """ Set the tag based on regex of log output """
        if self.out_type == "stderr":
            # Output all stderr in red
            return self.out_type

        output = self.recolor.match(string)
        if not output:
            return "default"
        tag = output.groupdict()["lvl"].strip().lower()
        return tag

      def write(self, string):
          """ Capture stdout/stderr """
          self.console.insert(tk.END, string, self.get_tag(string))
          self.console.see(tk.END)
keep add keep keep keep keep
 Color code log messages in GUI Console 
lib/gui/utils.py