syslog.install

Install, update and uninstall functions for the syslog module.

File

drupal/core/modules/syslog/syslog.install
View source
<?php

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

/**
 * Implements hook_install().
 */
function syslog_install() {

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

/**
 * @addtogroup updates-7.x-to-8.x
 * @{
 */

/**
 * 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',
  ));
}

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

Functions

Namesort descending Description
syslog_install Implements hook_install().
syslog_update_8000 Update settings to the new configuration system.