pgbackrest.git / summary / log / commit / refs

commit    d0e553e4c2a024be44a92dfa5eb0ce77330bcef7
Author:   David Steele <david@pgmasters.net>
Date:     Fri Nov 16 21:05:06 2018 +0000

    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.


doc/xml/release.xml | 7 +++++++ src/info/info.c | 42 ++++++++++++++++++++-------------------- test/expect/mock-archive-001.log | 4 ---- test/expect/mock-stanza-001.log | 2 -- 4 files changed, 28 insertions(+), 27 deletions(-) diff --git a/doc/xml/release.xml b/doc/xml/release.xml index 163cf9048..29ea09397 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -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"> diff --git a/src/info/info.c b/src/info/info.c index d7be922ed..35571cf13 100644 --- a/src/info/info.c +++ b/src/info/info.c @@ -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(); +} diff --git a/test/expect/mock-archive-001.log b/test/expect/mock-archive-001.log index 18cdb2c58..a1ea9033e 100644 --- a/test/expect/mock-archive-001.log +++ b/test/expect/mock-archive-001.log @@ -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"}) diff --git a/test/expect/mock-stanza-001.log b/test/expect/mock-stanza-001.log index 3a38f2c0d..fa2e1213e 100644 --- a/test/expect/mock-stanza-001.log +++ b/test/expect/mock-stanza-001.log @@ -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"}) [parent: 6532912d5105]