function theme_emaillog_format in Logging and alerts 7
Same name and namespace in other branches
- 6 emaillog/emaillog.module \theme_emaillog_format()
Themes email body.
1 theme call to theme_emaillog_format()
- emaillog_mail in emaillog/
emaillog.module - Implements hook_mail().
File
- emaillog/
emaillog.module, line 82 - Drupal Module: Email Logging and Alerts
Code
function theme_emaillog_format($log_msg = array()) {
global $base_url;
$severity_list = watchdog_severity_levels();
$message = "\nSite: @base_url";
$message .= "\nSeverity: (@severity) @severity_desc";
$message .= "\nTimestamp: @timestamp";
$message .= "\nType: @type";
$message .= "\nIP Address: @ip";
$message .= "\nRequest URI: @request_uri";
$message .= "\nReferrer URI: @referer_uri";
$message .= "\nUser: (@uid) @name";
$message .= "\nLink: @link";
$message .= "\nMessage: \n\n@message";
$message = t($message, array(
'@base_url' => $base_url,
'@severity' => $log_msg['severity'],
'@severity_desc' => drupal_ucfirst($severity_list[$log_msg['severity']]),
'@timestamp' => format_date($log_msg['timestamp']),
'@type' => $log_msg['type'],
'@ip' => $log_msg['ip'],
'@request_uri' => $log_msg['request_uri'],
'@referer_uri' => $log_msg['referer'],
'@uid' => $log_msg['user']->uid,
'@name' => format_username($log_msg['user']),
'@link' => strip_tags($log_msg['link']),
'@message' => strip_tags(t($log_msg['message'], $log_msg['variables'])),
));
return $message;
}