src/Guzzle/Plugin/Log/LogPlugin.php
public function onRequestSent(Event $event)
    {
        $request = $event['request'];
        $response = $event['response'];
        $handle = $event['handle'];

        if ($wire = $request->getParams()->get('request_wire')) {
            $request = clone $request;
            $request->setBody($wire);
        }

        if ($wire = $request->getParams()->get('response_wire')) {
            $response = clone $response;
            $response->setBody($wire);
        }

        // Send the log message to the adapter, adding a category and host
        $priority = $response && $response->isError() ? LOG_ERR : LOG_DEBUG;
        $message = $this->formatter->format($request, $response, $handle);
        $this->logAdapter->log($message, $priority, array(
            'request'  => $request,
            'response' => $response,
            'handle'   => $handle
        ));
    }
public function onRequestSent(Event $event)
    {
        $request = $event['request'];
        $response = $event['response'];
        $handle = $event['handle'];

        if ($wire = $request->getParams()->get('request_wire')) {
            $request = clone $request;
            $request->setBody($wire);
        }

        if ($wire = $request->getParams()->get('response_wire')) {
            $response = clone $response;
            $response->setBody($wire);
        }

        // Send the log message to the adapter, adding a category and host
        $priority = $response && $response->isError() ? LOG_ERR : LOG_DEBUG;
        $message = $this->formatter->format($request, $response, $handle);
        $this->logAdapter->log($message, $priority, array(
            'request'  => $request,
            'response' => $response,
            'handle'   => $handle
        ));
    }
public function onRequestSent ( Event $ event ) { $ request = $ event [ 'request' ] ; $ response = $ event [ 'response' ] ; $ handle = $ event [ 'handle' ] ; if ( $ wire = $ request -> getParams ( ) -> get ( 'request_wire' ) ) { $ request = clone $ request ; $ request -> setBody ( $ wire ) ; } if ( $ wire = $ request -> getParams ( ) -> get ( 'response_wire' ) ) { $ response = clone $ response ; $ response -> setBody ( $ wire ) ; } // Send the log message to the adapter, adding a category and host $ priority = $ response && $ response -> isError ( ) ? LOG_ERR : LOG_DEBUG ; $ message = $ this -> formatter -> format ( $ request , $ response , $ handle ) ; $ this -> logAdapter -> log ( $ message , $ priority , array ( 'request' => $ request , 'response' => $ response , 'handle' => $ handle ) ) ; }
Triggers the actual log write when a request completes

@param Event $event
Triggers the actual log write when a request completes