1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-18 04:58:51 +02:00

Reduce debug level for infoIni() to test.

Getters should generally not be logging at debug or trace level since it clutters the log.

In passing move the destructor to the end of the file.
This commit is contained in:
David Steele 2018-11-16 16:05:06 -05:00
parent 6532912d51
commit d0e553e4c2
4 changed files with 28 additions and 27 deletions

View File

@ -13,6 +13,13 @@
<release-list>
<release date="XXXX-XX-XX" version="2.08dev" title="UNDER DEVELOPMENT">
<release-core-list>
<release-development-list>
<release-item>
<p>Reduce debug level for <code>infoIni()</code> to test.</p>
</release-item>
</release-development-list>
</release-core-list>
</release>
<release date="2018-11-16" version="2.07" title="Automatic Backup Checksum Delta">

View File

@ -256,35 +256,19 @@ infoNew(
FUNCTION_DEBUG_RESULT(INFO, this);
}
/***********************************************************************************************************************************
Free the info
***********************************************************************************************************************************/
void
infoFree(Info *this)
{
FUNCTION_DEBUG_BEGIN(logLevelTrace);
FUNCTION_DEBUG_PARAM(INFO, this);
FUNCTION_DEBUG_END();
if (this != NULL)
memContextFree(this->memContext);
FUNCTION_DEBUG_RESULT_VOID();
}
/***********************************************************************************************************************************
Accessor functions
***********************************************************************************************************************************/
Ini *
infoIni(const Info *this)
{
FUNCTION_DEBUG_BEGIN(logLevelDebug);
FUNCTION_DEBUG_PARAM(INFO, this);
FUNCTION_TEST_BEGIN();
FUNCTION_TEST_PARAM(INFO, this);
FUNCTION_DEBUG_ASSERT(this != NULL);
FUNCTION_DEBUG_END();
FUNCTION_TEST_ASSERT(this != NULL);
FUNCTION_TEST_END();
FUNCTION_DEBUG_RESULT(INI, this->ini);
FUNCTION_TEST_RESULT(INI, this->ini);
}
String *
@ -298,3 +282,19 @@ infoFileName(const Info *this)
FUNCTION_TEST_RESULT(STRING, this->fileName);
}
/***********************************************************************************************************************************
Free the object
***********************************************************************************************************************************/
void
infoFree(Info *this)
{
FUNCTION_DEBUG_BEGIN(logLevelTrace);
FUNCTION_DEBUG_PARAM(INFO, this);
FUNCTION_DEBUG_END();
if (this != NULL)
memContextFree(this->memContext);
FUNCTION_DEBUG_RESULT_VOID();
}

View File

@ -135,8 +135,6 @@ P00 DEBUG: info/infoArchive::infoArchiveNew: (fileName: {"<REPO:ARCHIVE>/ar
P00 DEBUG: info/infoPg::infoPgNew: (fileName: {"<REPO:ARCHIVE>/archive.info"})
P00 DEBUG: info/info::infoNew: (fileName: {"<REPO:ARCHIVE>/archive.info"})
P00 DEBUG: info/info::infoNew: => {Info}
P00 DEBUG: info/info::infoIni: (this: {Info})
P00 DEBUG: info/info::infoIni: => {Ini}
P00 DEBUG: info/infoPg::infoPgNew: => {InfoPg}
P00 DEBUG: info/infoArchive::infoArchiveNew: => {InfoArchive}
P00 DEBUG: command/archive/common::walSegmentFind: (storage: {type: posix, path: {"[TEST_PATH]/db-master/repo"}, write: false}, archiveId: {"9.4-1"}, walSegment: {"700000007000000070000000"})
@ -177,8 +175,6 @@ P00 DEBUG: info/infoArchive::infoArchiveNew: (fileName: {"<REPO:ARCHIVE>/ar
P00 DEBUG: info/infoPg::infoPgNew: (fileName: {"<REPO:ARCHIVE>/archive.info"})
P00 DEBUG: info/info::infoNew: (fileName: {"<REPO:ARCHIVE>/archive.info"})
P00 DEBUG: info/info::infoNew: => {Info}
P00 DEBUG: info/info::infoIni: (this: {Info})
P00 DEBUG: info/info::infoIni: => {Ini}
P00 DEBUG: info/infoPg::infoPgNew: => {InfoPg}
P00 DEBUG: info/infoArchive::infoArchiveNew: => {InfoArchive}
P00 DEBUG: command/archive/common::walSegmentFind: (storage: {type: posix, path: {"[TEST_PATH]/db-master/repo"}, write: false}, archiveId: {"9.4-1"}, walSegment: {"000000010000000100000001"})

View File

@ -552,8 +552,6 @@ P00 DEBUG: info/infoArchive::infoArchiveNew: (fileName: {"<REPO:ARCHIVE>/ar
P00 DEBUG: info/infoPg::infoPgNew: (fileName: {"<REPO:ARCHIVE>/archive.info"})
P00 DEBUG: info/info::infoNew: (fileName: {"<REPO:ARCHIVE>/archive.info"})
P00 DEBUG: info/info::infoNew: => {Info}
P00 DEBUG: info/info::infoIni: (this: {Info})
P00 DEBUG: info/info::infoIni: => {Ini}
P00 DEBUG: info/infoPg::infoPgNew: => {InfoPg}
P00 DEBUG: info/infoArchive::infoArchiveNew: => {InfoArchive}
P00 DEBUG: command/archive/common::walSegmentFind: (storage: {type: posix, path: {"[TEST_PATH]/db-master/repo"}, write: false}, archiveId: {"9.3-1"}, walSegment: {"000000010000000100000002"})