mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
Consistently log strerror output as DETAIL
This commit is contained in:
@@ -123,9 +123,9 @@ load_config(const char *config_file, bool verbose, bool terse, t_configuration_o
|
||||
|
||||
if (stat(config_file_path, &stat_config) != 0)
|
||||
{
|
||||
log_error(_("provided configuration file \"%s\" not found: %s"),
|
||||
config_file,
|
||||
strerror(errno));
|
||||
log_error(_("provided configuration file \"%s\" not found"),
|
||||
config_file);
|
||||
log_detail("%s", strerror(errno));
|
||||
exit(ERR_BAD_CONFIG);
|
||||
}
|
||||
|
||||
|
||||
@@ -4376,9 +4376,8 @@ wait_connection_availability(PGconn *conn, long long timeout)
|
||||
gettimeofday(&before, &tz);
|
||||
if (select(sock, &read_set, NULL, NULL, &tmout) == -1)
|
||||
{
|
||||
log_warning(
|
||||
_("wait_connection_availability(): select() returned with error:\n %s"),
|
||||
strerror(errno));
|
||||
log_warning(_("wait_connection_availability(): select() returned with error"));
|
||||
log_detail("%s", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -351,8 +351,9 @@ create_pg_dir(const char *path, bool force)
|
||||
}
|
||||
break;
|
||||
case DIR_ERROR:
|
||||
log_error(_("could not access directory \"%s\": %s"),
|
||||
path, strerror(errno));
|
||||
log_error(_("could not access directory \"%s\"")
|
||||
, path);
|
||||
log_detail("%s", strerror(errno));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -618,7 +618,8 @@ daemonize_process(void)
|
||||
switch (pid)
|
||||
{
|
||||
case -1:
|
||||
log_error(_("error in fork():\n %s"), strerror(errno));
|
||||
log_error(_("error in fork()"));
|
||||
log_detail("%s", strerror(errno));
|
||||
exit(ERR_SYS_FAILURE);
|
||||
break;
|
||||
|
||||
@@ -627,7 +628,8 @@ daemonize_process(void)
|
||||
pid = setsid();
|
||||
if (pid == (pid_t) -1)
|
||||
{
|
||||
log_error(_("error in setsid():\n %s"), strerror(errno));
|
||||
log_error(_("error executing setsid()"));
|
||||
log_detail("%s", strerror(errno));
|
||||
exit(ERR_SYS_FAILURE);
|
||||
}
|
||||
|
||||
@@ -637,7 +639,8 @@ daemonize_process(void)
|
||||
/* error case */
|
||||
if (pid == -1)
|
||||
{
|
||||
log_error(_("error in fork():\n %s"), strerror(errno));
|
||||
log_error(_("error executing fork()"));
|
||||
log_detail("%s", strerror(errno));
|
||||
exit(ERR_SYS_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user