mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-24 23:56:29 +00:00
Rename "logxxx" configuration file parameters to "log_xxx"
This is more consistent with other parameters and conforms to the pattern used by PostgreSQL itself, which uses the prefix "log_" for logging parameters. A warning will be emitted if the old version of the parameter name is detected.
This commit is contained in:
36
config.c
36
config.c
@@ -214,11 +214,11 @@ _parse_config(t_configuration_options *options, ItemList *error_list, ItemList *
|
||||
/*
|
||||
* log settings
|
||||
*
|
||||
* note: the default for "loglevel" is set in log.c and does not need
|
||||
* note: the default for "log_level" is set in log.c and does not need
|
||||
* to be initialised here
|
||||
*/
|
||||
memset(options->logfacility, 0, sizeof(options->logfacility));
|
||||
memset(options->logfile, 0, sizeof(options->logfile));
|
||||
memset(options->log_facility, 0, sizeof(options->log_facility));
|
||||
memset(options->log_file, 0, sizeof(options->log_file));
|
||||
|
||||
/* standby clone settings
|
||||
* ----------------------- */
|
||||
@@ -348,12 +348,12 @@ _parse_config(t_configuration_options *options, ItemList *error_list, ItemList *
|
||||
}
|
||||
|
||||
/* log settings */
|
||||
else if (strcmp(name, "logfile") == 0)
|
||||
strncpy(options->logfile, value, MAXLEN);
|
||||
else if (strcmp(name, "loglevel") == 0)
|
||||
strncpy(options->loglevel, value, MAXLEN);
|
||||
else if (strcmp(name, "logfacility") == 0)
|
||||
strncpy(options->logfacility, value, MAXLEN);
|
||||
else if (strcmp(name, "log_file") == 0)
|
||||
strncpy(options->log_file, value, MAXLEN);
|
||||
else if (strcmp(name, "log_level") == 0)
|
||||
strncpy(options->log_level, value, MAXLEN);
|
||||
else if (strcmp(name, "log_facility") == 0)
|
||||
strncpy(options->log_facility, value, MAXLEN);
|
||||
|
||||
/* standby clone settings */
|
||||
else if (strcmp(name, "use_replication_slots") == 0)
|
||||
@@ -477,6 +477,24 @@ _parse_config(t_configuration_options *options, ItemList *error_list, ItemList *
|
||||
_("parameter \"upstream_node\" has been renamed to \"upstream_node_id\""));
|
||||
known_parameter = false;
|
||||
}
|
||||
else if (strcmp(name, "loglevel") == 0)
|
||||
{
|
||||
item_list_append(warning_list,
|
||||
_("parameter \"loglevel\" has been enamed to \"log_level\""));
|
||||
known_parameter = false;
|
||||
}
|
||||
else if (strcmp(name, "logfacility") == 0)
|
||||
{
|
||||
item_list_append(warning_list,
|
||||
_("parameter \"logfacility\" has been enamed to \"log_facility\""));
|
||||
known_parameter = false;
|
||||
}
|
||||
else if (strcmp(name, "logfile") == 0)
|
||||
{
|
||||
item_list_append(warning_list,
|
||||
_("parameter \"logfile\" has been enamed to \"log_file\""));
|
||||
known_parameter = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
known_parameter = false;
|
||||
|
||||
Reference in New Issue
Block a user