1.20.x system.install | system_update_1017() |
Moves system logging settings from variables to config.
Related topics
File
- modules/
system/ system.install, line 1948 - Install, update and uninstall functions for the system module.
Code
function system_update_1017() {
// Migrate variables to config.
$config = config('system.core');
$config->set('log_row_limit', update_variable_get('dblog_row_limit', 1000));
$config->set('log_identity', update_variable_get('syslog_identity', 'backdrop'));
$config->set('log_facility', update_variable_get('syslog_facility', LOG_LOCAL0));
$config->set('log_format', update_variable_get('syslog_format', '!base_url|!timestamp|!type|!ip|!request_uri|!referer|!uid|!link|!message'));
$config->set('error_level', update_variable_get('error_level', 'all'));
$config->save();
// Delete variables.
update_variable_del('error_level');
update_variable_del('dblog_row_limit');
update_variable_del('syslog_identity');
update_variable_del('syslog_facility');
update_variable_del('syslog_format');
}