You are here

function _restclient_debug in RESTClient 7.2

Debug function

2 calls to _restclient_debug()
_restclient_request in ./restclient.module
Basic request with no body data.
_restclient_request_with_body in ./restclient.module
Requests with body data.

File

./restclient.module, line 714
Defines a standard REST interface to RESTful services

Code

function _restclient_debug($values = array()) {

  // Check if debug is turned on.
  if (!variable_get("restclient_debug", FALSE)) {
    return;
  }

  // Output to watchdog.
  $values_string = 'Debug: <pre>' . print_r($values, TRUE) . '</pre>';
  watchdog('restclient', $values_string, NULL, WATCHDOG_DEBUG);

  // Output to devel dpm or debug.
  if (module_exists('devel')) {
    dpm($values);
  }
  else {
    debug($values, 'RESTClient Debug', TRUE);
  }

  // @todo add debug output to use with SimpleTest
}