def write_message(self, s, error=False, prefix="stash: "):
        """
        Write a message to the output.
        :param s: message to write
        :type w: str
        :param error: whether this is an error message
        :type error: bool
        """
        s = '%s%s\n' % (prefix, s)
        if error:
            if self.runtime.debug:
                self.logger.error(s)
            if self.runtime.colored_errors:
                s = self.text_color(s, "red")
        else:
            if self.runtime.debug:
                self.logger.info(s)
        self.io.write(s)

        Write a message to the output.
        :param s: message to write
        :type w: str
        :param error: whether this is an error message
        :type error: bool
        
core.py