'Adds msg to the list of messages to be printed.
:param str msg: Message to be displayed to the user.
:param int priority: One of `HIGH_PRIORITY`, `MEDIUM_PRIORITY`,
or `LOW_PRIORITY`.
:param bool on_crash: Whether or not the message should be
printed if the program exits abnormally.'

def add_message(self, msg, priority, on_crash=True):

    assert (self.HIGH_PRIORITY <= priority <= self.LOW_PRIORITY)
    self.messages.put(self._msg_type(priority, msg, on_crash))
    logger.debug('Reporting    to    user:    %s', msg)
