5 * Install, update and uninstall functions for the syslog module.
9 * Implements hook_install().
11 function syslog_install() {
12 // The default facility setting depends on the operating system, so it needs
13 // to be set dynamically during installation.
14 \Drupal::configFactory()->getEditable('syslog.settings')->set('facility', defined('LOG_LOCAL0') ? LOG_LOCAL0 : LOG_USER)->save();
18 * Convert syslog.settings.facility to an integer.
20 function syslog_update_8400() {
21 $config = \Drupal::configFactory()->getEditable('syslog.settings');
22 $facility = (int) $config->get('facility');
23 $config->set('facility', $facility)->save(TRUE);