def _debug(self, response):
        """Prints or logs a debug message.

        Required Arguments:
            response: object - the rauth response object.

        Returns:
            None
        """

        if self.debug:
            message = (
                "--------------------------------------------------\n"
                "URL:    {0}\nMETHOD: {1}\nSTATUS: 2\n\nREQUEST\n{3}\n\n"
                "RESPONSE\n{4}\n").format(
                    response.request.url, response.request.method, response.status_code,
                    response.request.__dict__, response.__dict__)

            if self.debug == "print":
                six.print_(message)
            elif self.debug == "log":
                logging.debug(message)
dataset/ETHPy150Open contextio/Python-ContextIO/contextio/lib/api.py/Api._debug/original