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

Convert ArchivePushFileIoType enum to StringId.

Improves debug logging by outputting open/write/close instead of 0/1/2.
This commit is contained in:
David Steele 2021-04-28 12:23:37 -04:00
parent 8394577c6a
commit 0ec91f61c6
2 changed files with 5 additions and 4 deletions

View File

@ -96,6 +96,7 @@
<commit subject="Convert ProtocolParallelJobState enum to StringId."/>
<commit subject="Convert ProtocolStorageType enum to StringId."/>
<commit subject="Convert ArchiveMode enum to StringId."/>
<commit subject="Convert ArchivePushFileIoType enum to StringId."/>
<release-item-contributor-list>
<release-item-reviewer id="cynthia.shang"/>

View File

@ -24,9 +24,9 @@ caller knows to stop writing on the affected repo.
***********************************************************************************************************************************/
typedef enum
{
archivePushFileIoTypeOpen,
archivePushFileIoTypeWrite,
archivePushFileIoTypeClose,
archivePushFileIoTypeOpen = STRID5("open", 0x7160f0),
archivePushFileIoTypeWrite = STRID5("write", 0x5a26570),
archivePushFileIoTypeClose = STRID5("close", 0x59bd830),
} ArchivePushFileIoType;
// Helper to add errors to the list
@ -50,7 +50,7 @@ static bool
archivePushFileIo(ArchivePushFileIoType type, IoWrite *write, const Buffer *buffer, unsigned int repoIdx, StringList *errorList)
{
FUNCTION_TEST_BEGIN();
FUNCTION_TEST_PARAM(ENUM, type);
FUNCTION_TEST_PARAM(STRING_ID, type);
FUNCTION_TEST_PARAM(IO_WRITE, write);
FUNCTION_TEST_PARAM(BUFFER, buffer);
FUNCTION_TEST_PARAM(UINT, repoIdx);