1--TEST-- 2SolrClient::getDebug() - Get request debug logs for the last request 3--SKIPIF-- 4<?php require_once 'skip.if.server_not_configured.inc'; ?> 5--FILE-- 6<?php 7 8require_once "bootstrap.inc"; 9 10$options = array 11( 12 'hostname' => SOLR_SERVER_HOSTNAME, 13 'login' => SOLR_SERVER_USERNAME, 14 'password' => SOLR_SERVER_PASSWORD, 15 'port' => SOLR_SERVER_PORT, 16 'path' => SOLR_SERVER_PATH 17); 18 19$client = new SolrClient($options); 20 21$response = $client->ping(); 22 23$debug = $client->getDebug(); 24 25$lines = explode("\n",$debug); 26$print = false; 27sort($lines); 28foreach ( $lines as $line) { 29 if ($line == '<?xml version="1.0" encoding="UTF-8"?>' || 30 FALSE !== strpos($line, 'Trying') || 31 0 === strpos($line, 'Mark bundle') || 32 0 === strpos($line, 'Server') || 33 0 === strpos($line, 'Hostname') || 34 0 === strpos($line, 'TCP_NODELAY') || 35 0 === strpos($line, 'Accept-Encoding') || 36 0 === strpos($line, 'Curl_http_done') 37 ) { 38 $print = false; 39 } else { 40 $print = true; 41 } 42 43 if ($print) { 44 echo $line . "\n"; 45 } 46} 47?> 48--EXPECTF-- 49Accept-Charset: utf-8 50Accept: */* 51Authorization: Basic YWRtaW46Y2hhbmdlaXQ= 52Connected to %s (%s) port 8983 (#0) 53Connection #0 to host %s left intact 54Connection: keep-alive 55Content-Length: 0 56Content-Type: application/xml; charset=UTF-8 57HEAD /solr/collection1/admin/ping/?version=2.2&indent=on&wt=xml HTTP/1.1 58HTTP/1.1 200 OK 59Host: %s:8983 60Keep-Alive: 300 61User-Agent: %s 62