syslog.install 815 Bytes
Newer Older
1 2 3 4 5 6 7 8
<?php

/**
 * @file
 * Install, update and uninstall functions for the syslog module.
 */

/**
9
 * Implements hook_install().
10
 */
11 12 13
function syslog_install() {
  // The default facility setting depends on the operating system, so it needs
  // to be set dynamically during installation.
14
  Drupal::config('syslog.settings')->set('facility', defined('LOG_LOCAL0') ? LOG_LOCAL0 : LOG_USER)->save();
15
}
16 17

/**
18
 * @addtogroup updates-7.x-to-8.x
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
 * @{
 */

/**
 * Update settings to the new configuration system.
 **/
function syslog_update_8000() {
  update_variables_to_config('syslog.settings', array(
    'syslog_identity' => 'identity',
    'syslog_facility' => 'facility',
    'syslog_format' => 'format',
  ));
}

/**
34
 * @} End of "addtogroup updates-7.x-to-8.x".
35 36
 * The next series of updates should start at 9000.
 */