function filelog_token_info in File Log 8
Same name and namespace in other branches
- 2.0.x filelog.tokens.inc \filelog_token_info()
Implements hook_token_info().
File
- ./
filelog.tokens.inc, line 13 - Builds placeholder replacement tokens for log messages.
Code
function filelog_token_info() {
return [
'types' => [
'log' => [
'name' => t('Log messages'),
'description' => t('Tokens related to a log message.'),
'needs-data' => 'log',
],
],
'tokens' => [
'log' => [
'type' => [
'name' => t('Type'),
'description' => t('The category of the log message.'),
],
'level' => [
'name' => t('Level'),
'description' => t('The severity of the log message.'),
],
'message' => [
'name' => t('Content'),
'description' => t('The message text, without HTML and with escaped line breaks.'),
],
'location' => [
'name' => t('Location'),
'description' => t('The requested URI.'),
],
'referrer' => [
'name' => t('Referrer'),
'description' => t('The referrer URL, if available.'),
],
'ip' => [
'name' => t('IP'),
'description' => t('The IP of the user triggering the message.'),
],
'created' => [
'name' => t('Date'),
'description' => t('The time when the message was created.'),
'type' => 'date',
],
'user' => [
'name' => t('User'),
'description' => t('The user who triggered the message.'),
'type' => 'user',
],
'variable' => [
'name' => t('Variable'),
'description' => t('Variables in the message (available variables vary between messages).'),
'dynamic' => TRUE,
],
'context' => [
'name' => t('Context'),
'description' => t('Context of the message (advanced usage).'),
'dynamic' => TRUE,
],
],
],
];
}