The amqp module also print the log when call publish, this will cause maximum recursion depth exceeded.

def emit(self, record):
        """
        The amqp module also print the log when call publish, this will cause maximum recursion depth exceeded.
        """
        if not record.name == "amqp":
            data = {}
            for k, v in record.__dict__.items():
                if (self.__includes and k in self.__includes) or (self.__excludes and k not in self.__excludes):
                    data[k] = v
            self.__producer.publish(data, retry=True, delivery_mode=2)