function syslog_install

Same name in other branches
  1. 9 core/modules/syslog/syslog.install \syslog_install()
  2. 10 core/modules/syslog/syslog.install \syslog_install()
  3. 11.x core/modules/syslog/syslog.install \syslog_install()

Implements hook_install().

File

core/modules/syslog/syslog.install, line 11

Code

function syslog_install() {
    // The default facility setting depends on the operating system, so it needs
    // to be set dynamically during installation.
    \Drupal::configFactory()->getEditable('syslog.settings')
        ->set('facility', defined('LOG_LOCAL0') ? LOG_LOCAL0 : LOG_USER)
        ->save();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.