public function UltimateCronLogEntry::formatSeverity in Ultimate Cron 7.2
Format severity.
File
- ./
ultimate_cron.plugin.inc, line 1602 - Plugin framework for Ultimate Cron.
Class
- UltimateCronLogEntry
- Abstract class for Ultimate Cron log entries.
Code
public function formatSeverity() {
switch ($this->severity) {
case WATCHDOG_EMERGENCY:
case WATCHDOG_ALERT:
case WATCHDOG_CRITICAL:
case WATCHDOG_ERROR:
$file = 'misc/message-16-error.png';
break;
case WATCHDOG_WARNING:
$file = 'misc/message-16-warning.png';
break;
case WATCHDOG_NOTICE:
$file = 'misc/message-16-info.png';
break;
case WATCHDOG_INFO:
case WATCHDOG_DEBUG:
default:
$file = 'misc/message-16-ok.png';
}
$status = theme('image', array(
'path' => $file,
));
$severity_levels = array(
-1 => t('no info'),
) + watchdog_severity_levels();
$title = $severity_levels[$this->severity];
return array(
$status,
$title,
);
}