function devel_watchdog in Devel 6
Same name and namespace in other branches
- 7 devel.module \devel_watchdog()
Implements hook_watchdog().
File
- ./
devel.module, line 366
Code
function devel_watchdog($log_entry) {
if (class_exists('FirePHP')) {
switch ($log_entry['severity']) {
case WATCHDOG_EMERG:
case WATCHDOG_ALERT:
case WATCHDOG_CRITICAL:
case WATCHDOG_ERROR:
$type = FirePHP::ERROR;
break;
case WATCHDOG_WARNING:
$type = FirePHP::WARN;
break;
case WATCHDOG_NOTICE:
case WATCHDOG_INFO:
$type = FirePHP::INFO;
break;
case WATCHDOG_DEBUG:
default:
$type = FirePHP::LOG;
}
}
else {
$type = 'watchdog';
}
$watchdog = array(
'type' => $log_entry['type'],
'message' => decode_entities(strtr($log_entry['message'], (array) $log_entry['variables'])),
);
if (isset($log_entry['link'])) {
$watchdog['link'] = $log_entry['link'];
}
dfb($watchdog, $type);
}