You are here

function logs_http_shutdown in Logs HTTP 7

Same name and namespace in other branches
  1. 8 logs_http.module \logs_http_shutdown()

Runs on shutdown to clean up and display developer information.

devel_boot() registers this function as a shutdown function.

1 string reference to 'logs_http_shutdown'
logs_http_boot in ./logs_http.module
Implements hook_boot().

File

./logs_http.module, line 95
Logs HTTP module.

Code

function logs_http_shutdown() {
  if (!($events = logs_http_get_registered_events())) {
    return;
  }
  $url = logs_http_get_http_url();

  // Send events to logs.
  foreach ($events as $event) {
    $options = array(
      'method' => 'POST',
      'data' => drupal_json_encode($event),
    );

    // Send data to Logs.
    $response = drupal_http_request($url, $options);
  }
}