SysLog::openConnection

protected SysLog::openConnection()

Opens a connection to the system logger.

File

core/modules/syslog/src/Logger/SysLog.php, line 53

Class

SysLog
Redirects logging messages to syslog.

Namespace

Drupal\syslog\Logger

Code

protected function openConnection() {
  if (!$this->connectionOpened) {
    $facility = $this->config->get('facility');
    if ($facility === '') {
      $facility = defined('LOG_LOCAL0') ? LOG_LOCAL0 : LOG_USER;
    }
    $this->connectionOpened = openlog($this->config->get('identity'), LOG_NDELAY, $facility);
  }
}
doc_Drupal
2016-10-29 09:45:33
Comments
Leave a Comment

Please login to continue.