diff options
author | merge-script <fanquake@gmail.com> | 2024-09-02 11:59:56 +0100 |
---|---|---|
committer | merge-script <fanquake@gmail.com> | 2024-09-02 11:59:56 +0100 |
commit | d4cc0c684518b3db11c333ff97d82e170c8b86b8 (patch) | |
tree | 1adda4519e276cc04d4d2faf883fe6a77caa0a37 /contrib | |
parent | ef6f49ecaf42c2abf3d3b52ed7c3158339e4abe1 (diff) | |
parent | fa09cb41f58d0483ffe134eb274b9048c5260faa (diff) |
Merge bitcoin/bitcoin#30750: scripted-diff: LogPrint -> LogDebug
fa09cb41f58d0483ffe134eb274b9048c5260faa refactor: Remove unused LogPrint (MarcoFalke)
333341589010b1d9b21b68ae6649992fd2653756 scripted-diff: LogPrint -> LogDebug (MarcoFalke)
Pull request description:
`LogPrint` has many issues:
* It seems to indicate that something is being "printed", however config options such as `-printtoconsole` actually control what and where something is logged.
* It does not mention the log severity (debug).
* It is a deprecated alias for `LogDebug`, according to the dev notes.
* It wastes review cycles, because reviewers sometimes point out that it is deprecated.
* It makes the code inconsistent, when both are used, possibly even in lines right next to each other (like in `InitHTTPServer`)
Fix all issues by removing the deprecated alias.
I checked all conflicting pull requests and at the time of writing there are no conflicts, except in pull requests that are marked as draft, are yet unreviewed, or are blocked on feedback for other reasons. So I think it is fine to do now.
ACKs for top commit:
stickies-v:
ACK fa09cb41f58d0483ffe134eb274b9048c5260faa
danielabrozzoni:
utACK fa09cb41f58d0483ffe134eb274b9048c5260faa
TheCharlatan:
ACK fa09cb41f58d0483ffe134eb274b9048c5260faa
Tree-SHA512: 14270f4cfa3906025a0b994cbb5b2e3c8c2427c0beb19c717a505a2ccbfb1fd1ecf2fd03f6c52d22cde69a8d057e50d2207119fab2c2bc8228db3f10d4288d0f
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/devtools/bitcoin-tidy/example_logprintf.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/devtools/bitcoin-tidy/example_logprintf.cpp b/contrib/devtools/bitcoin-tidy/example_logprintf.cpp index a12a666c08..dc77f668e3 100644 --- a/contrib/devtools/bitcoin-tidy/example_logprintf.cpp +++ b/contrib/devtools/bitcoin-tidy/example_logprintf.cpp @@ -22,7 +22,7 @@ static inline void LogPrintf_(const std::string& logging_function, const std::st #define LogPrintLevel_(category, level, ...) LogPrintf_(__func__, __FILE__, __LINE__, category, level, __VA_ARGS__) #define LogPrintf(...) LogPrintLevel_(LogFlags::NONE, Level::None, __VA_ARGS__) -#define LogPrint(category, ...) \ +#define LogDebug(category, ...) \ do { \ LogPrintf(__VA_ARGS__); \ } while (0) |