code: def discard(self, msg, reason, logMethod=logging.error, cliOutput=False):
          
          reason = "" if not reason else " because {}".format(reason)
          logMethod("{} discarding message {}{}".format(self, msg, reason),
                    extra={"cli": cliOutput})
docs: Discard a message and log a reason using the specified `logMethod`.
  
          :param msg: the message to discard
          :param reason: the reason why this message is being discarded
          :param logMethod: the logging function to be used
          :param cliOutput: if truthy, informs a CLI that the logged msg should
          be printed