src/Google/AdsApi/Common/GuzzleLogMessageFormatter.php
private function scrubAndFormatDetailedMessage(
        RequestInterface $request,
        ResponseInterface $response = null,
        Exception $error = null
    ) {
        $requestHeaders = LogMessageScrubbers::scrubHttpHeadersArray(
            $request->getHeaders(),
            $this->requestHttpHeadersToScrub
        );
        $changes = [
            'set_headers' => $requestHeaders,
            // The request body is encoded and thus needed to be decoded here
            // to provide a readable log message.
            'body' => urldecode($request->getBody())
        ];
        $clonedRequest = \GuzzleHttp\Psr7\modify_request($request, $changes);

        return $this->detailedMessageFormatter->format(
            $clonedRequest,
            $response,
            $error
        );
    }
private function scrubAndFormatDetailedMessage(
        RequestInterface $request,
        ResponseInterface $response = null,
        Exception $error = null
    ) {
        $requestHeaders = LogMessageScrubbers::scrubHttpHeadersArray(
            $request->getHeaders(),
            $this->requestHttpHeadersToScrub
        );
        $changes = [
            'set_headers' => $requestHeaders,
            // The request body is encoded and thus needed to be decoded here
            // to provide a readable log message.
            'body' => urldecode($request->getBody())
        ];
        $clonedRequest = \GuzzleHttp\Psr7\modify_request($request, $changes);

        return $this->detailedMessageFormatter->format(
            $clonedRequest,
            $response,
            $error
        );
    }
private function scrubAndFormatDetailedMessage ( RequestInterface $ request , ResponseInterface $ response = null , Exception $ error = null ) { $ requestHeaders = LogMessageScrubbers :: scrubHttpHeadersArray ( $ request -> getHeaders ( ) , $ this -> requestHttpHeadersToScrub ) ; $ changes = [ 'set_headers' => $ requestHeaders , // The request body is encoded and thus needed to be decoded here // to provide a readable log message. 'body' => urldecode ( $ request -> getBody ( ) ) ] ; $ clonedRequest = \ GuzzleHttp \ Psr7 \ modify_request ( $ request , $ changes ) ; return $ this -> detailedMessageFormatter -> format ( $ clonedRequest , $ response , $ error ) ; }
Scrubs and formats a detailed message containing HTTP request and
response, and errors if exist.

@param RequestInterface $request the HTTP request
@param ResponseInterface|null $response the HTTP response
@param Exception $error the HTTP error
@return string the formatted detailed log message
Scrubs and formats a detailed message containing HTTP request and response and errors if exist .