You are here

function watchdog_rules_token_values in Logging and alerts 6

Same name and namespace in other branches
  1. 6.2 watchdog_rules/watchdog_rules.module \watchdog_rules_token_values()

Implementation of hook_token_values().

File

watchdog_rules/watchdog_rules.module, line 37
Provides a Rules integration for wachdog events.

Code

function watchdog_rules_token_values($type, $object = NULL, $options = array()) {
  $tokens = array();
  if ($type == 'watchdog' || $type == 'all') {
    $tokens = array(
      'type' => $object['type'],
      'request_uri' => $object['request_uri'],
      'referer' => $object['referer'],
      'ip' => $object['ip'],
      'timestamp' => $object['timestamp'],
      'severity' => $object['severity'],
      'link' => $object['link'],
      'message' => $object['message'],
    );
    return $tokens;
  }
}