Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #2547: [Util] Replace LogPrintf (but not LogPrint) macro with r…
…egular function 14f2239 [Util] Replace LogPrintf (but not LogPrint) macro with regular function (random-zebra) Pull request description: This commit combines together bitcoin#14209 [MarcoFalke] and bitcoin#17218 [jkczyz] - The first one replaces `LogPrintf` and `LogPrint` macros with functions: > 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 c8914b9) > > Fix this instead by replacing the macros with functions. - The second one restores the `LogPrint` macro: > Calling LogPrint with a category that is not enabled results in evaluating the remaining function arguments, which may be arbitrarily complex (and possibly expensive) expressions. Defining LogPrint as a macro prevents this unnecessary expression evaluation. > > This is a partial revert of 14209. The decision to revert is discussed in 16688, which adds verbose logging for validation event notification. ACKs for top commit: furszy: ACK 14f2239 Fuzzbawls: ACK 14f2239 Tree-SHA512: bbbe475aae784e18acaf8f4f1eae8f6114f9ddb5eff460225fd0a1d40f999826bac99fb63f1359d71d03c6694d9c56fa697bfdee546188fe4fdf1a2f3de3eb22
- Loading branch information