src/BaiduBce/Http/GuzzleLogAdapter.php
public function log($message, $priority = LOG_INFO, $extras = array())
    {
        // All guzzle logs should be DEBUG, regardless of its own priority.
        if (LogFactory::isDebugEnabled()) {
            // To avoid memory exhausted, truncate request or response longer than 1024 bytes.
            if(strlen($extras['request']) > 1024){
                $extras['request'] = substr($request, 0, 1024);
            }
            if(strlen($extras['response']) > 1024){
                $extras['response'] = substr($response, 0, 1024);
            }
            $this->logger->log(LogLevel::DEBUG, $message, $extras);
        }
    }
public function log($message, $priority = LOG_INFO, $extras = array())
    {
        // All guzzle logs should be DEBUG, regardless of its own priority.
        if (LogFactory::isDebugEnabled()) {
            // To avoid memory exhausted, truncate request or response longer than 1024 bytes.
            if(strlen($extras['request']) > 1024){
                $extras['request'] = substr($request, 0, 1024);
            }
            if(strlen($extras['response']) > 1024){
                $extras['response'] = substr($response, 0, 1024);
            }
            $this->logger->log(LogLevel::DEBUG, $message, $extras);
        }
    }
public function log ( $ message , $ priority = LOG_INFO , $ extras = array ( ) ) { // All guzzle logs should be DEBUG, regardless of its own priority. if ( LogFactory :: isDebugEnabled ( ) ) { // To avoid memory exhausted, truncate request or response longer than 1024 bytes. if ( strlen ( $ extras [ 'request' ] ) > 1024 ) { $ extras [ 'request' ] = substr ( $ request , 0 , 1024 ) ; } if ( strlen ( $ extras [ 'response' ] ) > 1024 ) { $ extras [ 'response' ] = substr ( $ response , 0 , 1024 ) ; } $ this -> logger -> log ( LogLevel :: DEBUG , $ message , $ extras ) ; } }
Logs the message.

@param string $message the log message
@param int $priority the log level
@param array $extras extra arguments
Logs the message .