function theme_errorlog_format in Logging and alerts 7.2
Same name and namespace in other branches
- 6.2 errorlog/errorlog.module \theme_errorlog_format()
- 6 errorlog/errorlog.module \theme_errorlog_format()
- 7 errorlog/errorlog.module \theme_errorlog_format()
Themes error log message.
1 call to theme_errorlog_format()
- errorlog_watchdog in errorlog/
errorlog.module - Implements hook_watchdog().
1 theme call to theme_errorlog_format()
- errorlog_watchdog in errorlog/
errorlog.module - Implements hook_watchdog().
File
- errorlog/
errorlog.module, line 77 - Drupal Module: Web Server Logging and Alerts
Code
function theme_errorlog_format($log_msg = array()) {
global $base_root;
$severity_list = watchdog_severity_levels();
$message = variable_get('site_name', 'Drupal');
$message .= '|' . $base_root;
$message .= '|severity=' . $severity_list[$log_msg['severity']];
$message .= '|type=' . $log_msg['type'];
$message .= '|ip=' . $log_msg['ip'];
$message .= '|uri=' . $log_msg['request_uri'];
$message .= '|referer=' . $log_msg['referer'];
$message .= '|uid=' . $log_msg['user']->uid;
$message .= '|link=' . strip_tags($log_msg['link']);
$message .= '|message=' . strip_tags(t($log_msg['message'], $log_msg['variables']));
return $message;
}