mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-28 01:16:29 +00:00
Convert some remaining fprintf messages to logger
This commit is contained in:
12
config.c
12
config.c
@@ -43,7 +43,7 @@ parse_config(const char* config_file, t_configuration_options* options)
|
|||||||
*/
|
*/
|
||||||
if (fp == NULL)
|
if (fp == NULL)
|
||||||
{
|
{
|
||||||
fprintf(stderr, _("Did not find the configuration file '%s', continuing\n"), config_file);
|
log_err(_("Did not find the configuration file '%s', continuing\n"), config_file);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ parse_config(const char* config_file, t_configuration_options* options)
|
|||||||
else if (strcmp(name, "logfacility") == 0)
|
else if (strcmp(name, "logfacility") == 0)
|
||||||
strncpy (options->logfacility, value, MAXLEN);
|
strncpy (options->logfacility, value, MAXLEN);
|
||||||
else
|
else
|
||||||
printf ("WARNING: %s/%s: Unknown name/value pair!\n", name, value);
|
log_warning(_("%s/%s: Unknown name/value pair!\n"), name, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Close file */
|
/* Close file */
|
||||||
@@ -80,19 +80,18 @@ parse_config(const char* config_file, t_configuration_options* options)
|
|||||||
/* Check config settings */
|
/* Check config settings */
|
||||||
if (strnlen(options->cluster_name, MAXLEN)==0)
|
if (strnlen(options->cluster_name, MAXLEN)==0)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Cluster name is missing. "
|
log_err(_("Cluster name is missing. Check the configuration file.\n"));
|
||||||
"Check the configuration file.\n");
|
|
||||||
exit(ERR_BAD_CONFIG);
|
exit(ERR_BAD_CONFIG);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options->node == -1)
|
if (options->node == -1)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Node information is missing. "
|
log_err(_("Node information is missing. Check the configuration file.\n"));
|
||||||
"Check the configuration file.\n");
|
|
||||||
exit(ERR_BAD_CONFIG);
|
exit(ERR_BAD_CONFIG);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
trim (char *s)
|
trim (char *s)
|
||||||
{
|
{
|
||||||
@@ -145,3 +144,4 @@ parse_line(char *buff, char *name, char *value)
|
|||||||
value[j] = '\0';
|
value[j] = '\0';
|
||||||
trim(value);
|
trim(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user