function syslog_watchdog

7.x syslog.module syslog_watchdog(array $log_entry)
6.x syslog.module syslog_watchdog($entry)

File

drupal-6.x/modules/syslog/syslog.module, line 77
Redirects logging messages to syslog.

Code

function syslog_watchdog($entry) {
  static $log_init = FALSE;

  if (!$log_init) {
    $log_init = TRUE;
    openlog(variable_get('syslog_identity', 'drupal'), LOG_NDELAY, variable_get('syslog_facility', DEFAULT_SYSLOG_FACILITY));
  }

  syslog($entry['severity'], theme('syslog_format', $entry));
}