function watchdog_rules_token_info in Logging and alerts 7.2
Same name and namespace in other branches
- 7 watchdog_rules/watchdog_rules.module \watchdog_rules_token_info()
Implements hook_token_info().
File
- watchdog_rules/
watchdog_rules.module, line 42 - Provides a Rules integration for wachdog events.
Code
function watchdog_rules_token_info() {
$type = array(
'name' => t('Watchdog tokens'),
'description' => t('Watchdog tokens'),
'needs-data' => 'watchdog',
);
$watchdog['type'] = array(
'name' => t("Watchdog type"),
'description' => t("The type of the watchdog event."),
);
$watchdog['request_uri'] = array(
'name' => t("Watchdog request URI"),
'description' => t('The request URI for the page the event happened in.'),
);
$watchdog['referer'] = array(
'name' => t("Watchdog referer"),
'description' => t('The page that referred the user to the page where the event occurred.'),
);
$watchdog['ip'] = array(
'name' => t("Watchdog ip"),
'description' => t('The IP address where the request for the page came from.'),
);
$watchdog['timestamp'] = array(
'name' => t("Watchdog timestamp"),
'description' => t('The UNIX timetamp of the date/time the event occurred.'),
);
$watchdog['severity'] = array(
'name' => t("Watchdog severity"),
'description' => t('The degree of severity of the event.'),
);
$watchdog['link'] = array(
'name' => t("Watchdog link"),
'description' => t('An informational link provided by the module calling watchdog.'),
);
$watchdog['message'] = array(
'name' => t("Watchdog message"),
'description' => t('The text of the message to be logged.'),
);
return array(
'types' => array(
'watchdog' => $type,
),
'tokens' => array(
'watchdog' => $watchdog,
),
);
}