HomePhabricator

Merge #14209/#17218: logging: Replace LogPrintf macro with regular function

Description

Merge #14209/#17218: logging: Replace LogPrintf macro with regular function

Summary:
fae3fbd61a89c7a35bc0eda91b1df61371dc0936 logging: Replace LogPrint macros with regular functions (MarcoFalke)

Pull request description:

It is not possible to run the full test suite when configured with `--enable-lcov`, since logging is disabled currently so that "unnecessary branches are not analyzed". (See c8914b9dbbf6106dac3c62769f7ce3bacd8fbf9b)

Fix this instead by replacing the macros with functions.

Tree-SHA512: 101aa4f4a3ffcefc38faf70c9d3deb5fc63e0b11ca54a164d0463931c79eaf53ab0b0c6ae92a45355574e3b1d2c32233874a6b24293e7a09d188fc6698e212a5

Only LogPrintf() is replaced due to PR17218 reversing the change.

Backport of Core PR14209 and PR17218

Test Plan:

make check
./bitcoind -printtoconsole=0 -debuglogfile=0

Verify no logging information is printed.

./bitcoind -printtoconsole=0

Verify logging information is printed to debug.log file.

./bitcoind

Verify logging information is printed to console.

Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: deadalnix, Fabien, O1 Bitcoin ABC, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D5047

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Sep 13 2018, 07:43
nakihitoCommitted on Feb 3 2020, 20:15
deadalnixPushed on Feb 3 2020, 23:22
Reviewer
Restricted Owners Package
Differential Revision
D5047: Merge #14209/#17218: logging: Replace LogPrintf macro with regular function
Parents
rSTAGING2d094cbae708: Merge #13938: refactoring: Cleanup StartRest()
Branches
Unknown
Tags
Unknown