function _views_watchdog_get_severity in Views Watchdog 6.3
Same name and namespace in other branches
- 6.2 views_watchdog.module \_views_watchdog_get_severity()
- 7.3 views_watchdog.module \_views_watchdog_get_severity()
Helper function; retrieves list of severity levels.
8 calls to _views_watchdog_get_severity()
- template_preprocess_views_view_watchdog_table in views/
theme/ theme.inc - Display a view as a watchdog table style.
- views_handler_field_watchdog_severity::options_form in views/
handlers/ views_handler_field_watchdog_severity.inc - views_handler_field_watchdog_severity::options_validate in views/
handlers/ views_handler_field_watchdog_severity.inc - views_handler_field_watchdog_severity::option_definition in views/
handlers/ views_handler_field_watchdog_severity.inc - views_handler_field_watchdog_severity::render in views/
handlers/ views_handler_field_watchdog_severity.inc
File
- ./
views_watchdog.module, line 42 - This module extends the Views module and allows to create customized lists (pages, blocks, feeds) of watchdog entries.
Code
function _views_watchdog_get_severity($code = NULL, $item = NULL) {
static $severity = array();
if (!$severity) {
$severity[WATCHDOG_EMERG] = array(
'title' => t('Emergency'),
'text' => t('System is unusable.'),
'icon' => 'misc/watchdog-error.png',
'arg' => 'emergency',
);
$severity[WATCHDOG_ALERT] = array(
'title' => t('Alert'),
'text' => t('Action must be taken immediately.'),
'icon' => 'misc/watchdog-error.png',
'arg' => 'alert',
);
$severity[WATCHDOG_CRITICAL] = array(
'title' => t('Critical'),
'text' => t('Critical conditions.'),
'icon' => 'misc/watchdog-error.png',
'arg' => 'critical',
);
$severity[WATCHDOG_ERROR] = array(
'title' => t('Error'),
'text' => t('Error conditions.'),
'icon' => 'misc/watchdog-error.png',
'arg' => 'error',
);
$severity[WATCHDOG_WARNING] = array(
'title' => t('Warning'),
'text' => t('Warning conditions.'),
'icon' => 'misc/watchdog-warning.png',
'arg' => 'warning',
);
$severity[WATCHDOG_NOTICE] = array(
'title' => t('Notice'),
'text' => t('Normal but significant condition.'),
'icon' => '',
'arg' => 'notice',
);
$severity[WATCHDOG_INFO] = array(
'title' => t('Info'),
'text' => t('Informational messages.'),
'icon' => '',
'arg' => 'info',
);
$severity[WATCHDOG_DEBUG] = array(
'title' => t('Debug'),
'text' => t('Debug-level messages.'),
'icon' => '',
'arg' => 'debug',
);
}
return $code ? $item ? $severity[$code][$item] : $severity[$code] : $severity;
}