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.'),
55 'base' => 'users_field_data',
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' => 'dblog_types',
78 $data['watchdog']['message'] = [
79 'title' => t('Message'),
80 'help' => t('The actual message of the log entry.'),
82 'id' => 'dblog_message',
95 $data['watchdog']['variables'] = [
96 'title' => t('Variables'),
97 'help' => t('The variables of the log entry in a serialized format.'),
100 'click sortable' => FALSE,
113 $data['watchdog']['severity'] = [
114 'title' => t('Severity level'),
115 'help' => t('The severity level of the event; ranges from 0 (Emergency) to 7 (Debug).'),
117 'id' => 'machine_name',
118 'options callback' => 'Drupal\dblog\Controller\DbLogController::getLogLevelClassMap',
121 'id' => 'in_operator',
122 'options callback' => 'Drupal\Core\Logger\RfcLogLevel::getLevels',
129 $data['watchdog']['link'] = [
130 'title' => t('Operations'),
131 'help' => t('Operation links for the event.'),
133 'id' => 'dblog_operations',
146 $data['watchdog']['location'] = [
147 'title' => t('Location'),
148 'help' => t('URL of the origin of the event.'),
163 $data['watchdog']['referer'] = [
164 'title' => t('Referer'),
165 'help' => t('URL of the previous page.'),
180 $data['watchdog']['hostname'] = [
181 'title' => t('Hostname'),
182 'help' => t('Hostname of the user who triggered the event.'),
197 $data['watchdog']['timestamp'] = [
198 'title' => t('Timestamp'),
199 'help' => t('Date when the event occurred.'),