5 * Provide views data for dblog.module.
9 * Implements hook_views_data().
11 function dblog_views_data() {
14 $data['watchdog']['table']['group'] = t('Watchdog');
15 $data['watchdog']['table']['wizard_id'] = 'watchdog';
17 $data['watchdog']['table']['base'] = [
19 'title' => t('Log entries'),
20 'help' => t('Contains a list of log entries.'),
23 $data['watchdog']['wid'] = [
25 'help' => t('Unique watchdog event ID.'),
40 $data['watchdog']['uid'] = [
42 'help' => t('The user ID of the user on which the log entry was written..'),
54 'help' => t('The user on which the log entry as written.'),
56 'base field' => 'uid',
61 $data['watchdog']['type'] = [
63 'help' => t('The type of the log entry, for example "user" or "page not found".'),
71 'id' => 'in_operator',
72 'options callback' => '_dblog_get_message_types',
79 $data['watchdog']['message'] = [
80 'title' => t('Message'),
81 'help' => t('The actual message of the log entry.'),
83 'id' => 'dblog_message',
96 $data['watchdog']['variables'] = [
97 'title' => t('Variables'),
98 'help' => t('The variables of the log entry in a serialized format.'),
100 'id' => 'serialized',
101 'click sortable' => FALSE,
114 $data['watchdog']['severity'] = [
115 'title' => t('Severity level'),
116 'help' => t('The severity level of the event; ranges from 0 (Emergency) to 7 (Debug).'),
118 'id' => 'machine_name',
119 'options callback' => 'Drupal\dblog\Controller\DbLogController::getLogLevelClassMap',
122 'id' => 'in_operator',
123 'options callback' => 'Drupal\dblog\Controller\DbLogController::getLogLevelClassMap',
130 $data['watchdog']['link'] = [
131 'title' => t('Operations'),
132 'help' => t('Operation links for the event.'),
134 'id' => 'dblog_operations',
147 $data['watchdog']['location'] = [
148 'title' => t('Location'),
149 'help' => t('URL of the origin of the event.'),
164 $data['watchdog']['referer'] = [
165 'title' => t('Referer'),
166 'help' => t('URL of the previous page.'),
181 $data['watchdog']['hostname'] = [
182 'title' => t('Hostname'),
183 'help' => t('Hostname of the user who triggered the event.'),
198 $data['watchdog']['timestamp'] = [
199 'title' => t('Timestamp'),
200 'help' => t('Date when the event occurred.'),