pgbackrest.git / summary / log / commit / refs

commit    fc5fdb8d358ae09d398922c1a8df44f47c8b40d6
Author:   David Steele <david@pgbackrest.org>
Date:     Sat Nov 02 15:36:56 2024 +0000

    Fix incorrect log macros.
    
    These led to incorrect log output in some cases. Probably not very noticeable, but definitely wrong.
    
    Also fix types in the log macro comments.


doc/src/command/build/man.c | 6 +++--- src/command/check/common.c | 8 ++++---- src/command/expire/expire.c | 2 +- src/command/verify/verify.c | 8 ++++---- src/common/debug.h | 4 ++-- src/common/exec.c | 2 +- src/protocol/helper.c | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/doc/src/command/build/man.c b/doc/src/command/build/man.c index 1e82a1ff2..3ae589c74 100644 --- a/doc/src/command/build/man.c +++ b/doc/src/command/build/man.c @@ -23,7 +23,7 @@ static String * referenceManReplace(String *const string) { FUNCTION_TEST_BEGIN(); - FUNCTION_LOG_PARAM(STRING, string); + FUNCTION_TEST_PARAM(STRING, string); FUNCTION_TEST_END(); String *const result = strCat(strNew(), string); @@ -49,8 +49,8 @@ static size_t referenceManMaxWidth(const size_t widthMax, const String *const string) { FUNCTION_TEST_BEGIN(); - FUNCTION_LOG_PARAM(SIZE, widthMax); - FUNCTION_LOG_PARAM(STRING, string); + FUNCTION_TEST_PARAM(SIZE, widthMax); + FUNCTION_TEST_PARAM(STRING, string); FUNCTION_TEST_END(); if (strSize(string) > widthMax) diff --git a/src/command/check/common.c b/src/command/check/common.c index b47826655..5c9c66fc8 100644 --- a/src/command/check/common.c +++ b/src/command/check/common.c @@ -128,10 +128,10 @@ checkStanzaInfoPg( const String *const cipherPass) { FUNCTION_TEST_BEGIN(); - FUNCTION_LOG_PARAM(STORAGE, storage); - FUNCTION_LOG_PARAM(UINT, pgVersion); - FUNCTION_LOG_PARAM(UINT64, pgSystemId); - FUNCTION_LOG_PARAM(STRING_ID, cipherType); + FUNCTION_TEST_PARAM(STORAGE, storage); + FUNCTION_TEST_PARAM(UINT, pgVersion); + FUNCTION_TEST_PARAM(UINT64, pgSystemId); + FUNCTION_TEST_PARAM(STRING_ID, cipherType); FUNCTION_TEST_PARAM(STRING, cipherPass); FUNCTION_TEST_END(); diff --git a/src/command/expire/expire.c b/src/command/expire/expire.c index 3f5b7780b..5cd19fd18 100644 --- a/src/command/expire/expire.c +++ b/src/command/expire/expire.c @@ -99,7 +99,7 @@ expireAdhocBackup(InfoBackup *const infoBackup, const String *const backupLabel, FUNCTION_LOG_BEGIN(logLevelDebug); FUNCTION_LOG_PARAM(INFO_BACKUP, infoBackup); FUNCTION_LOG_PARAM(STRING, backupLabel); - FUNCTION_TEST_PARAM(UINT, repoIdx); + FUNCTION_LOG_PARAM(UINT, repoIdx); FUNCTION_LOG_END(); ASSERT(infoBackup != NULL); diff --git a/src/command/verify/verify.c b/src/command/verify/verify.c index 76c7bc0b9..112a0e5b7 100644 --- a/src/command/verify/verify.c +++ b/src/command/verify/verify.c @@ -370,11 +370,11 @@ verifyManifestFile( unsigned int *const jobErrorTotal) { FUNCTION_LOG_BEGIN(logLevelDebug); - FUNCTION_TEST_PARAM_P(VERIFY_BACKUP_RESULT, backupResult); // The result set for the backup being processed + FUNCTION_LOG_PARAM_P(VERIFY_BACKUP_RESULT, backupResult); // The result set for the backup being processed FUNCTION_TEST_PARAM(STRING, cipherPass); // Passphrase to access the manifest file FUNCTION_LOG_PARAM(BOOL, currentBackup); // Is this possibly a backup currently in progress? - FUNCTION_TEST_PARAM(INFO_PG, pgHistory); // Database history - FUNCTION_TEST_PARAM_P(UINT, jobErrorTotal); // Pointer to the overall job error total + FUNCTION_LOG_PARAM(INFO_PG, pgHistory); // Database history + FUNCTION_LOG_PARAM_P(UINT, jobErrorTotal); // Pointer to the overall job error total FUNCTION_LOG_END(); Manifest *result = NULL; @@ -1469,7 +1469,7 @@ static String * verifyProcess(const bool verboseText) { FUNCTION_LOG_BEGIN(logLevelDebug); - FUNCTION_TEST_PARAM(BOOL, verboseText); // Is verbose output requested? + FUNCTION_LOG_PARAM(BOOL, verboseText); // Is verbose output requested? FUNCTION_LOG_END(); String *const result = strNew(); diff --git a/src/common/debug.h b/src/common/debug.h index 9f433037b..b8c24312f 100644 --- a/src/common/debug.h +++ b/src/common/debug.h @@ -389,7 +389,7 @@ Ignore DEBUG_TEST_TRACE_MACRO if DEBUG is not defined because the underlying fun FUNCTION_LOG_PARAM_PP(typeName, param) #define FUNCTION_TEST_END() \ - (void)FUNCTION_TEST_BEGIN_exists; /* CHECK for presense of FUNCTION_TEST_BEGIN*() */ \ + (void)FUNCTION_TEST_BEGIN_exists; /* CHECK for presence of FUNCTION_TEST_BEGIN*() */ \ \ stackTraceTestStart(); \ } @@ -401,7 +401,7 @@ Ignore DEBUG_TEST_TRACE_MACRO if DEBUG is not defined because the underlying fun #define FUNCTION_TEST_RETURN_TYPE_BASE(typePre, type, typePost, ...) \ do \ { \ - (void)FUNCTION_TEST_BEGIN_exists; /* CHECK for presense of FUNCTION_TEST_BEGIN*() */ \ + (void)FUNCTION_TEST_BEGIN_exists; /* CHECK for presence of FUNCTION_TEST_BEGIN*() */ \ \ typePre type typePost FUNCTION_TEST_result = __VA_ARGS__; \ \ diff --git a/src/common/exec.c b/src/common/exec.c index 2b7a09b60..8fb3b9393 100644 --- a/src/common/exec.c +++ b/src/common/exec.c @@ -158,7 +158,7 @@ static void execCheckStatusError(Exec *const this, int status, const String *const output) { FUNCTION_TEST_BEGIN(); - FUNCTION_LOG_PARAM(EXEC, this); + FUNCTION_TEST_PARAM(EXEC, this); FUNCTION_TEST_PARAM(INT, status); FUNCTION_TEST_PARAM(STRING, output); FUNCTION_TEST_END(); diff --git a/src/protocol/helper.c b/src/protocol/helper.c index aae6e4726..81470efb1 100644 --- a/src/protocol/helper.c +++ b/src/protocol/helper.c @@ -350,7 +350,7 @@ protocolServerAuthorize(const String *authListStr, const String *const stanza) { FUNCTION_TEST_BEGIN(); FUNCTION_TEST_PARAM(STRING, authListStr); - FUNCTION_LOG_PARAM(STRING, stanza); + FUNCTION_TEST_PARAM(STRING, stanza); FUNCTION_TEST_END(); ASSERT(authListStr != NULL); [parent: ed390780685a]