Tidy up some log output

This commit is contained in:
Ian Barwick
2017-09-12 11:08:41 +09:00
parent 13d55b9bd8
commit b6cd816923
4 changed files with 9 additions and 8 deletions

View File

@@ -932,7 +932,7 @@ reload_config(t_configuration_options *orig_options)
if (config_errors.head != NULL)
{
/* XXX dump errors to log */
log_warning(_("unable to parse new configuration, retaining current configuration\n"));
log_warning(_("unable to parse new configuration, retaining current configuration"));
return false;
}
@@ -946,7 +946,7 @@ reload_config(t_configuration_options *orig_options)
if (strcmp(new_options.node_name, orig_options->node_name) != 0)
{
log_warning(_("\"node_name\" cannot be changed, keeping current configuration\n"));
log_warning(_("\"node_name\" cannot be changed, keeping current configuration"));
return false;
}

View File

@@ -129,7 +129,7 @@ do_bdr_register(void)
if (node_exists == false)
{
log_error(_("no BDR node with node_name \"%s\" found"), config_file_options.node_name);
log_hint(_("\"node_name\" in repmgr.conf must match \"node_name\" in bdr.bdr_nodes\n"));
log_hint(_("\"node_name\" in repmgr.conf must match \"node_name\" in bdr.bdr_nodes"));
PQfinish(conn);
exit(ERR_BAD_CONFIG);
}
@@ -272,8 +272,9 @@ do_bdr_register(void)
{
appendPQExpBuffer(&event_details, _("node record updated for node '%s' (%i)"),
config_file_options.node_name, config_file_options.node_id);
log_verbose(LOG_NOTICE, "%s\n", event_details.data);
log_verbose(LOG_NOTICE, "%s", event_details.data);
}
else
{
success = false;
}

View File

@@ -84,7 +84,7 @@ do_cluster_show(void)
ItemList warnings = {NULL, NULL};
/* Connect to local database to obtain cluster connection data */
log_verbose(LOG_INFO, _("connecting to database\n"));
log_verbose(LOG_INFO, _("connecting to database"));
if (strlen(config_file_options.conninfo))
conn = establish_db_connection(config_file_options.conninfo, true);
@@ -1052,7 +1052,7 @@ build_cluster_crosscheck(t_node_status_cube ***dest_cube, int *name_length)
int node_count = 0;
/* We need to connect to get the list of nodes */
log_info(_("connecting to database\n"));
log_info(_("connecting to database"));
if (strlen(config_file_options.conninfo))
conn = establish_db_connection(config_file_options.conninfo, true);
@@ -1327,7 +1327,7 @@ do_cluster_cleanup(void)
if (vacuum_table(primary_conn, "repmgr.monitoring_history") == false)
{
/* annoying if this fails, but not fatal */
log_warning(_("unable to vacuum table repmgr.monitoring_history\n"));
log_warning(_("unable to vacuum table \"repmgr.monitoring_history\""));
log_detail("%s", PQerrorMessage(primary_conn));
}

View File

@@ -4039,7 +4039,7 @@ run_file_backup(t_node_info *node_record)
make_barman_ssh_command(barman_command_buf),
config_file_options.barman_server);
log_verbose(LOG_DEBUG, "executing:\n %s\n", command);
log_verbose(LOG_DEBUG, "executing:\n %s", command);
fi = popen(command, "r");
if (fi == NULL)