def on_request(  # pylint: disable=too-many-return-statements
        self, request: PipelineRequest[HTTPRequestType]
    ) -> None:
        """Logs HTTP method, url and headers.
        :param request: The PipelineRequest object.
        :type request: ~azure.core.pipeline.PipelineRequest
        """
        http_request = request.http_request
        options = request.context.options
        # Get logger in my context first (request has been retried)
        # then read from kwargs (pop if that's the case)
        # then use my instance logger
        logger = request.context.setdefault("logger", options.pop("logger", self.logger))

        if not logger.isEnabledFor(logging.INFO):
            return

        try:
            parsed_url = list(urllib.parse.urlparse(http_request.url))
            parsed_qp = urllib.parse.parse_qsl(parsed_url[4], keep_blank_values=True)
            filtered_qp = [(key, self._redact_query_param(key, value)) for key, value in parsed_qp]
            # 4 is query
            parsed_url[4] = "&".join(["=".join(part) for part in filtered_qp])
            redacted_url = urllib.parse.urlunparse(parsed_url)

            multi_record = os.environ.get(HttpLoggingPolicy.MULTI_RECORD_LOG, False)
            if multi_record:
                logger.info("Request URL: %r", redacted_url)
                logger.info("Request method: %r", http_request.method)
                logger.info("Request headers:")
                for header, value in http_request.headers.items():
                    value = self._redact_header(header, value)
                    logger.info("    %r: %r", header, value)
                if isinstance(http_request.body, types.GeneratorType):
                    logger.info("File upload")
                    return
                try:
                    if isinstance(http_request.body, types.AsyncGeneratorType):
                        logger.info("File upload")
                        return
                except AttributeError:
                    pass
                if http_request.body:
                    logger.info("A body is sent with the request")
                    return
                logger.info("No body was attached to the request")
                return
            log_string = "Request URL: '{}'".format(redacted_url)
            log_string += "\nRequest method: '{}'".format(http_request.method)
            log_string += "\nRequest headers:"
            for header, value in http_request.headers.items():
                value = self._redact_header(header, value)
                log_string += "\n    '{}': '{}'".format(header, value)
            if isinstance(http_request.body, types.GeneratorType):
                log_string += "\nFile upload"
                logger.info(log_string)
                return
            try:
                if isinstance(http_request.body, types.AsyncGeneratorType):
                    log_string += "\nFile upload"
                    logger.info(log_string)
                    return
            except AttributeError:
                pass
            if http_request.body:
                log_string += "\nA body is sent with the request"
                logger.info(log_string)
                return
            log_string += "\nNo body was attached to the request"
            logger.info(log_string)

        except Exception as err:  # pylint: disable=broad-except
            logger.warning("Failed to log request: %s", repr(err))
Logs HTTP method, url and headers.
        :param request: The PipelineRequest object.
        :type request: ~azure.core.pipeline.PipelineRequest
        
Solutions/CyberArkAudit/Data Connectors/.python_packages/lib/site-packages/azure/core/pipeline/policies/_universal.py