You are here

function errorlog_watchdog in Logging and alerts 6

Same name and namespace in other branches
  1. 6.2 errorlog/errorlog.module \errorlog_watchdog()
  2. 7.2 errorlog/errorlog.module \errorlog_watchdog()
  3. 7 errorlog/errorlog.module \errorlog_watchdog()

Implementation of hook_watchdog().

File

errorlog/errorlog.module, line 39
Sends logs and alerts to the web server's log.

Code

function errorlog_watchdog($log) {
  global $user;
  $language = user_preferred_language($user);
  $message = theme('errorlog_format', $log);
  if (variable_get('errorlog_' . $log['severity'], FALSE)) {
    error_log($message);
  }
}