You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-15 01:04:37 +02:00
Fix incorrectly reported error return in info logging.
A return code of 1 from the archive-get was being logged as an error message at info level but otherwise worked correctly. Also improve info messages when an archive segment is or is not found.
This commit is contained in:
@ -171,7 +171,6 @@ cmdEnd(int code, const String *errorMessage)
|
||||
FUNCTION_DEBUG_PARAM(STRING, errorMessage);
|
||||
|
||||
FUNCTION_DEBUG_ASSERT(cfgCommand() != cfgCmdNone);
|
||||
FUNCTION_DEBUG_ASSERT(code == 0 || errorMessage != NULL);
|
||||
FUNCTION_DEBUG_END();
|
||||
|
||||
// Skip this log message if it won't be output. It's not too expensive but since we skipped cmdBegin(), may as well.
|
||||
@ -182,7 +181,7 @@ cmdEnd(int code, const String *errorMessage)
|
||||
// Basic info on command end
|
||||
String *info = strNewFmt("%s command end: ", cfgCommandName(cfgCommand()));
|
||||
|
||||
if (code == 0)
|
||||
if (errorMessage == NULL)
|
||||
{
|
||||
strCat(info, "completed successfully");
|
||||
|
||||
|
Reference in New Issue
Block a user