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 /src/ipc | |
parent | ef6f49ecaf42c2abf3d3b52ed7c3158339e4abe1 (diff) | |
parent | fa09cb41f58d0483ffe134eb274b9048c5260faa (diff) | |
download | bitcoin-d4cc0c684518b3db11c333ff97d82e170c8b86b8.tar.xz |
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 'src/ipc')
-rw-r--r-- | src/ipc/capnp/protocol.cpp | 2 | ||||
-rw-r--r-- | src/ipc/interfaces.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/ipc/capnp/protocol.cpp b/src/ipc/capnp/protocol.cpp index 37b57a9525..73276d6d90 100644 --- a/src/ipc/capnp/protocol.cpp +++ b/src/ipc/capnp/protocol.cpp @@ -30,7 +30,7 @@ namespace capnp { namespace { void IpcLogFn(bool raise, std::string message) { - LogPrint(BCLog::IPC, "%s\n", message); + LogDebug(BCLog::IPC, "%s\n", message); if (raise) throw Exception(message); } diff --git a/src/ipc/interfaces.cpp b/src/ipc/interfaces.cpp index e446cc98db..b409443f64 100644 --- a/src/ipc/interfaces.cpp +++ b/src/ipc/interfaces.cpp @@ -37,11 +37,11 @@ public: { int pid; int fd = m_process->spawn(new_exe_name, m_process_argv0, pid); - LogPrint(::BCLog::IPC, "Process %s pid %i launched\n", new_exe_name, pid); + LogDebug(::BCLog::IPC, "Process %s pid %i launched\n", new_exe_name, pid); auto init = m_protocol->connect(fd, m_exe_name); Ipc::addCleanup(*init, [this, new_exe_name, pid] { int status = m_process->waitSpawned(pid); - LogPrint(::BCLog::IPC, "Process %s pid %i exited with status %i\n", new_exe_name, pid, status); + LogDebug(::BCLog::IPC, "Process %s pid %i exited with status %i\n", new_exe_name, pid, status); }); return init; } |