Paradox/Debug.php
protected function trace($data)
    {
        if ($this->_debug) {

            //Open the tags and output request specific items
            if ($data->getType() == "request") {
                print '<table style="border-style: solid; border-width: 1px; border-color: #b1b1b1; margin: 5px"><tr><td style="vertical-align: top; padding: 10px; width: 400px">';
                print "<h3>Request to server</h3>";
                print "<p><strong>{$data->getMethod()}</strong> {$data->getRequestUrl()}</p>";
            }

            //Output response specific items
            if ($data->getType() == "response") {
                print '<td style="vertical-align: top; padding: 10px; padding-left: 20px; width: 400px"><h3>Response from server</h3>';

                if ($data->getHttpCode() >= 400) {
                    print '<p style="color: red"><strong>' . $data->getHttpCode() . '</strong> ' . $data->getHttpCodeDefinition() . '</p>';
                } else {
                    print '<p style="color: green"><strong>' . $data->getHttpCode() . '</strong> ' . $data->getHttpCodeDefinition() . '</p>';
                }

            }

            //Headers
            print "<pre>";
            foreach ($data->getHeaders() as $header => $value) {
                 print "$header : $value\n";
            }
            print "</pre>";

            //Body
            if ($data->getBody()) {
                $body = json_decode($data->getBody());
                print "<pre>" . json_encode($body, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . "</pre>";
            }

            //Close off the tags
            if ($data->getType() == "request") {
                print '</td>';
            }

            if ($data->getType() == "response") {
                print '<p>Time taken: ' . $data->getTimeTaken() * 1000 . ' ms</pre>';
                print "</td></tr></table>";
            }
        }
    }
protected function trace($data)
    {
        if ($this->_debug) {

            //Open the tags and output request specific items
            if ($data->getType() == "request") {
                print '<table style="border-style: solid; border-width: 1px; border-color: #b1b1b1; margin: 5px"><tr><td style="vertical-align: top; padding: 10px; width: 400px">';
                print "<h3>Request to server</h3>";
                print "<p><strong>{$data->getMethod()}</strong> {$data->getRequestUrl()}</p>";
            }

            //Output response specific items
            if ($data->getType() == "response") {
                print '<td style="vertical-align: top; padding: 10px; padding-left: 20px; width: 400px"><h3>Response from server</h3>';

                if ($data->getHttpCode() >= 400) {
                    print '<p style="color: red"><strong>' . $data->getHttpCode() . '</strong> ' . $data->getHttpCodeDefinition() . '</p>';
                } else {
                    print '<p style="color: green"><strong>' . $data->getHttpCode() . '</strong> ' . $data->getHttpCodeDefinition() . '</p>';
                }

            }

            //Headers
            print "<pre>";
            foreach ($data->getHeaders() as $header => $value) {
                 print "$header : $value\n";
            }
            print "</pre>";

            //Body
            if ($data->getBody()) {
                $body = json_decode($data->getBody());
                print "<pre>" . json_encode($body, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . "</pre>";
            }

            //Close off the tags
            if ($data->getType() == "request") {
                print '</td>';
            }

            if ($data->getType() == "response") {
                print '<p>Time taken: ' . $data->getTimeTaken() * 1000 . ' ms</pre>';
                print "</td></tr></table>";
            }
        }
    }
Outputs the debug message.
@param \triagens\ArangoDb\TraceResponse|\triagens\ArangoDb\TraceRequest $data The HTTP request or response trace object.