1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-03-03 14:52:21 +02:00

Convert InfoPgType enum to StringId.

Improves debug logging by outputting archive/backup instead of 0/1.
This commit is contained in:
David Steele 2021-04-28 13:21:24 -04:00
parent bd0081fec8
commit fb7ddce807
3 changed files with 7 additions and 6 deletions

View File

@ -98,6 +98,7 @@
<commit subject="Convert ArchiveMode enum to StringId."/>
<commit subject="Convert ArchivePushFileIoType enum to StringId."/>
<commit subject="Update IoClient/IoSession to use StringIds."/>
<commit subject="Convert InfoPgType enum to StringId."/>
<release-item-contributor-list>
<release-item-reviewer id="cynthia.shang"/>

View File

@ -54,7 +54,7 @@ static InfoPg *
infoPgNewInternal(InfoPgType type)
{
FUNCTION_TEST_BEGIN();
FUNCTION_TEST_PARAM(ENUM, type);
FUNCTION_TEST_PARAM(STRING_ID, type);
FUNCTION_TEST_END();
InfoPg *this = memNew(sizeof(InfoPg));
@ -77,7 +77,7 @@ InfoPg *
infoPgNew(InfoPgType type, const String *cipherPassSub)
{
FUNCTION_LOG_BEGIN(logLevelDebug);
FUNCTION_LOG_PARAM(ENUM, type);
FUNCTION_LOG_PARAM(STRING_ID, type);
FUNCTION_TEST_PARAM(STRING, cipherPassSub);
FUNCTION_LOG_END();
@ -158,7 +158,7 @@ infoPgNewLoad(IoRead *read, InfoPgType type, InfoLoadNewCallback *callbackFuncti
{
FUNCTION_LOG_BEGIN(logLevelDebug);
FUNCTION_LOG_PARAM(IO_READ, read);
FUNCTION_LOG_PARAM(ENUM, type);
FUNCTION_LOG_PARAM(STRING_ID, type);
FUNCTION_LOG_PARAM(FUNCTIONP, callbackFunction);
FUNCTION_LOG_PARAM_P(VOID, callbackData);
FUNCTION_LOG_END();
@ -232,7 +232,7 @@ infoPgSet(
{
FUNCTION_LOG_BEGIN(logLevelDebug);
FUNCTION_LOG_PARAM(INFO_PG, this);
FUNCTION_LOG_PARAM(ENUM, type);
FUNCTION_LOG_PARAM(STRING_ID, type);
FUNCTION_LOG_PARAM(UINT, pgVersion);
FUNCTION_LOG_PARAM(UINT64, pgSystemId);
FUNCTION_LOG_PARAM(UINT, pgCatalogVersion);

View File

@ -38,8 +38,8 @@ Info types for determining data in DB section
***********************************************************************************************************************************/
typedef enum
{
infoPgArchive, // archive info file
infoPgBackup, // backup info file
infoPgArchive = STRID5("archive", 0x16c940e410), // archive info file
infoPgBackup = STRID5("backup", 0x21558c220), // backup info file
} InfoPgType;
/***********************************************************************************************************************************