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)
|
if (stat(config_file_path, &stat_config) != 0)
|
||||||
{
|
{
|
||||||
log_error(_("provided configuration file \"%s\" not found: %s"),
|
log_error(_("provided configuration file \"%s\" not found"),
|
||||||
config_file,
|
config_file);
|
||||||
strerror(errno));
|
log_detail("%s", strerror(errno));
|
||||||
exit(ERR_BAD_CONFIG);
|
exit(ERR_BAD_CONFIG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4376,9 +4376,8 @@ wait_connection_availability(PGconn *conn, long long timeout)
|
|||||||
gettimeofday(&before, &tz);
|
gettimeofday(&before, &tz);
|
||||||
if (select(sock, &read_set, NULL, NULL, &tmout) == -1)
|
if (select(sock, &read_set, NULL, NULL, &tmout) == -1)
|
||||||
{
|
{
|
||||||
log_warning(
|
log_warning(_("wait_connection_availability(): select() returned with error"));
|
||||||
_("wait_connection_availability(): select() returned with error:\n %s"),
|
log_detail("%s", strerror(errno));
|
||||||
strerror(errno));
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -351,8 +351,9 @@ create_pg_dir(const char *path, bool force)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DIR_ERROR:
|
case DIR_ERROR:
|
||||||
log_error(_("could not access directory \"%s\": %s"),
|
log_error(_("could not access directory \"%s\"")
|
||||||
path, strerror(errno));
|
, path);
|
||||||
|
log_detail("%s", strerror(errno));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -618,7 +618,8 @@ daemonize_process(void)
|
|||||||
switch (pid)
|
switch (pid)
|
||||||
{
|
{
|
||||||
case -1:
|
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);
|
exit(ERR_SYS_FAILURE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -627,7 +628,8 @@ daemonize_process(void)
|
|||||||
pid = setsid();
|
pid = setsid();
|
||||||
if (pid == (pid_t) -1)
|
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);
|
exit(ERR_SYS_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -637,7 +639,8 @@ daemonize_process(void)
|
|||||||
/* error case */
|
/* error case */
|
||||||
if (pid == -1)
|
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);
|
exit(ERR_SYS_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user