diff --git a/configfile.c b/configfile.c index 0dd6f6a8..b2246de5 100644 --- a/configfile.c +++ b/configfile.c @@ -1370,7 +1370,7 @@ parse_bool(const char *s, const char *config_item, ItemList *error_list) initPQExpBuffer(&errors); appendPQExpBuffer(&errors, - "\"%s\": unable to interpret '%s' as a boolean value", + "\"%s\": unable to interpret \"%s\" as a boolean value", config_item, s); item_list_append(error_list, errors.data); termPQExpBuffer(&errors); diff --git a/dbutils.c b/dbutils.c index 1cc83377..33b9c37d 100644 --- a/dbutils.c +++ b/dbutils.c @@ -3161,7 +3161,7 @@ create_replication_slot(PGconn *conn, char *slot_name, int server_version_num, P slot_name); } - log_debug(_("create_replication_slot(): creating slot '%s' on upstream"), slot_name); + log_debug(_("create_replication_slot(): creating slot \"%s\" on upstream"), slot_name); log_verbose(LOG_DEBUG, "create_replication_slot():\n%s", query.data); res = PQexec(conn, query.data); diff --git a/log.c b/log.c index 99676a2f..143cd46d 100644 --- a/log.c +++ b/log.c @@ -263,14 +263,14 @@ logger_init(t_configuration_options *opts, const char *ident) fd = fopen(opts->log_file, "a"); if (fd == NULL) { - stderr_log_error(_("unable to open specified log file '%s' for writing: %s\n"), + stderr_log_error(_("unable to open specified log file \"%s\" for writing: %s\n"), opts->log_file, strerror(errno)); stderr_log_error(_("Terminating\n")); exit(ERR_BAD_CONFIG); } fclose(fd); - stderr_log_notice(_("redirecting logging output to '%s'\n"), opts->log_file); + stderr_log_notice(_("redirecting logging output to \"%s\"\n"), opts->log_file); fd = freopen(opts->log_file, "a", stderr); /* diff --git a/repmgr-action-bdr.c b/repmgr-action-bdr.c index dd52c769..02a5c3cc 100644 --- a/repmgr-action-bdr.c +++ b/repmgr-action-bdr.c @@ -277,9 +277,9 @@ do_bdr_register(void) if (strncmp(node_info.node_name, config_file_options.node_name, MAXLEN) != 0) { - log_error(_("a record for node %i is already registered with node_name '%s'"), + log_error(_("a record for node %i is already registered with node_name \"%s\""), config_file_options.node_id, node_info.node_name); - log_hint(_("node_name configured in repmgr.conf is '%s'"), config_file_options.node_name); + log_hint(_("node_name configured in repmgr.conf is \"%s\""), config_file_options.node_name); rollback_transaction(conn); PQfinish(conn); @@ -290,7 +290,7 @@ do_bdr_register(void) if (node_updated == true) { - appendPQExpBuffer(&event_details, _("node record updated for node '%s' (%i)"), + 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", event_details.data); } @@ -308,7 +308,7 @@ do_bdr_register(void) if (node_created == true) { appendPQExpBuffer(&event_details, - _("node record created for node '%s' (ID: %i)"), + _("node record created for node \"%s\" (ID: %i)"), config_file_options.node_name, config_file_options.node_id); log_notice("%s", event_details.data); } diff --git a/repmgr-action-standby.c b/repmgr-action-standby.c index ea3aadcd..5c9724d4 100644 --- a/repmgr-action-standby.c +++ b/repmgr-action-standby.c @@ -642,7 +642,7 @@ do_standby_clone(void) /* Add details about relevant runtime options used */ appendPQExpBuffer(&event_details, - _("cloned from host '%s', port %s"), + _("cloned from host \"%s\", port %s"), runtime_options.host, runtime_options.port); @@ -2271,8 +2271,6 @@ do_standby_switchover(void) if (command_success == true) { status = parse_node_check_archiver(command_output.data, &files, &threshold); - - log_debug("%i %i; '%s'", files, threshold, command_output.data); } termPQExpBuffer(&command_output); @@ -2773,7 +2771,7 @@ do_standby_switchover(void) termPQExpBuffer(&node_rejoin_options); - log_debug("executing:\n \"%s\"", remote_command_str.data); + log_debug("executing:\n %s", remote_command_str.data); initPQExpBuffer(&command_output); command_success = remote_command( @@ -2873,7 +2871,7 @@ do_standby_switchover(void) appendPQExpBuffer(&remote_command_str, "standby follow 2>/dev/null && echo \"1\" || echo \"0\""); get_conninfo_value(cell->node_info->conninfo, "host", host); - log_debug("executing:\n \"%s\"", remote_command_str.data); + log_debug("executing:\n %s", remote_command_str.data); initPQExpBuffer(&command_output); @@ -3251,9 +3249,9 @@ check_upstream_config(PGconn *conn, int server_version_num, t_node_info *node_in { if (exit_on_error == true) { - log_error(_("error(s) encountered parsing 'pg_basebackup_options'")); + log_error(_("error(s) encountered parsing \"pg_basebackup_options\"")); print_error_list(&backup_option_errors, LOG_ERR); - log_hint(_("'pg_basebackup_options' is: '%s'"), + log_hint(_("\"pg_basebackup_options\" is: \"%s\""), config_file_options.pg_basebackup_options); exit(ERR_BAD_CONFIG); } @@ -3893,7 +3891,7 @@ run_basebackup(t_node_info *node_record) termPQExpBuffer(¶ms); - log_info(_("executing: '%s'"), script); + log_info(_("executing:\n %s"), script); /* * As of 9.4, pg_basebackup only ever returns 0 or 1 @@ -4320,7 +4318,7 @@ run_file_backup(t_node_info *node_record) if (mapping_found == true) { tblspc_dir_dest = cell->new_dir; - log_debug(_("mapping source tablespace '%s' (OID %s) to '%s'"), + log_debug(_("mapping source tablespace \"%s\" (OID %s) to \"%s\""), cell_t->location, cell_t->oid, tblspc_dir_dest); } else @@ -4445,7 +4443,7 @@ run_file_backup(t_node_info *node_record) tablespace_map_file = fopen(tablespace_map_filename.data, "w"); if (tablespace_map_file == NULL) { - log_error(_("unable to create tablespace_map file '%s'"), tablespace_map_filename.data); + log_error(_("unable to create tablespace_map file \"%s\""), tablespace_map_filename.data); r = ERR_BAD_BASEBACKUP; goto stop_backup; @@ -4453,7 +4451,7 @@ run_file_backup(t_node_info *node_record) if (fputs(tablespace_map.data, tablespace_map_file) == EOF) { - log_error(_("unable to write to tablespace_map file '%s'"), tablespace_map_filename.data); + log_error(_("unable to write to tablespace_map file \"%s\""), tablespace_map_filename.data); r = ERR_BAD_BASEBACKUP; goto stop_backup; diff --git a/repmgr-client.c b/repmgr-client.c index 586fbea6..370b5f5e 100644 --- a/repmgr-client.c +++ b/repmgr-client.c @@ -2055,7 +2055,7 @@ test_ssh_connection(char *host, char *remote_user) } if (r != 0) - log_warning(_("unable to connect to remote host '%s' via SSH"), host); + log_warning(_("unable to connect to remote host \"%s\" via SSH"), host); return r; } @@ -2281,7 +2281,7 @@ copy_remote_files(char *host, char *remote_user, char *remote_path, termPQExpBuffer(&rsync_flags); - log_info(_("rsync command line: '%s'"), script); + log_info(_("rsync command line:\n %s"), script); r = system(script); diff --git a/repmgrd-bdr.c b/repmgrd-bdr.c index b17c702d..b17c3943 100644 --- a/repmgrd-bdr.c +++ b/repmgrd-bdr.c @@ -47,7 +47,7 @@ monitor_bdr(void) instr_time log_status_interval_start; /* sanity check local database */ - log_info(_("connecting to local database '%s'"), + log_info(_("connecting to local database \"%s\""), config_file_options.conninfo); local_conn = establish_db_connection(config_file_options.conninfo, true); @@ -314,7 +314,7 @@ loop: fd = freopen(config_file_options.log_file, "a", stderr); if (fd == NULL) { - fprintf(stderr, "error reopening stderr to '%s': %s", + fprintf(stderr, "error reopening stderr to \"%s\": %s", config_file_options.log_file, strerror(errno)); } } @@ -456,7 +456,7 @@ do_bdr_failover(NodeInfoList *nodes, t_node_info *monitored_node) log_notice(_("setting node record for node %i to inactive"), monitored_node->node_id); appendPQExpBuffer(&event_details, - _("node '%s' (ID: %i) detected as failed; next available node is '%s' (ID: %i)"), + _("node \"%s\" (ID: %i) detected as failed; next available node is \"%s\" (ID: %i)"), monitored_node->node_name, monitored_node->node_id, target_node.node_name, diff --git a/repmgrd-physical.c b/repmgrd-physical.c index cf3e28ce..c963f222 100644 --- a/repmgrd-physical.c +++ b/repmgrd-physical.c @@ -391,7 +391,7 @@ loop: fd = freopen(config_file_options.log_file, "a", stderr); if (fd == NULL) { - fprintf(stderr, "error reopening stderr to '%s': %s", + fprintf(stderr, "error reopening stderr to \"%s\": %s", config_file_options.log_file, strerror(errno)); } } @@ -925,7 +925,7 @@ loop: fd = freopen(config_file_options.log_file, "a", stderr); if (fd == NULL) { - fprintf(stderr, "error reopening stderr to '%s': %s", + fprintf(stderr, "error reopening stderr to \"%s\": %s", config_file_options.log_file, strerror(errno)); } } diff --git a/repmgrd.c b/repmgrd.c index be73e9d2..e850bb5c 100644 --- a/repmgrd.c +++ b/repmgrd.c @@ -497,7 +497,7 @@ daemonize_process(void) ret = chdir(path); if (ret != 0) { - log_error(_("error changing directory to '%s':\n %s"), path, + log_error(_("error changing directory to \"%s\":\n %s"), path, strerror(errno)); } @@ -525,7 +525,7 @@ check_and_create_pid_file(const char *pid_file) if (fd == NULL) { - log_error(_("PID file %s exists but could not opened for reading"), pid_file); + log_error(_("PID file \"%s\" exists but could not opened for reading"), pid_file); log_hint(_("if repmgrd is no longer alive, remove the file and restart repmgrd")); exit(ERR_BAD_PIDFILE); } @@ -534,7 +534,7 @@ check_and_create_pid_file(const char *pid_file) if (nread == 0 && ferror(fd)) { - log_error(_("error reading PID file '%s', aborting"), pid_file); + log_error(_("error reading PID file \"%s\", aborting"), pid_file); exit(ERR_BAD_PIDFILE); } @@ -546,7 +546,7 @@ check_and_create_pid_file(const char *pid_file) { if (kill(pid, 0) != -1) { - log_error(_("PID file %s exists and seems to contain a valid PID"), pid_file); + log_error(_("PID file \"%s\" exists and seems to contain a valid PID"), pid_file); log_hint(_("if repmgrd is no longer alive, remove the file and restart repmgrd")); exit(ERR_BAD_PIDFILE); }