You are here

function syslog_watchdog in Drupal 6

Same name and namespace in other branches
  1. 7 modules/syslog/syslog.module \syslog_watchdog()

File

modules/syslog/syslog.module, line 77

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));
}