aboutsummaryrefslogtreecommitdiff
path: root/src/node
diff options
context:
space:
mode:
authorAva Chow <github@achow101.com>2024-06-14 14:34:48 -0400
committerAva Chow <github@achow101.com>2024-06-14 14:34:48 -0400
commit538497ba27f58549876830189346e5b76bd55517 (patch)
tree713954b26ce1b5af6be59a4e69e2ccffdd8ad5db /src/node
parent0b94fb87206616e475566c3667cbaad0e9faa5b0 (diff)
parentfae3a1f0065064d80ab4c0375a9eaeb666c5dd55 (diff)
Merge bitcoin/bitcoin#30255: log: use error level for critical log messages
fae3a1f0065064d80ab4c0375a9eaeb666c5dd55 log: use error level for critical log messages (MarcoFalke) Pull request description: This picks up the first commit from https://github.com/bitcoin/bitcoin/pull/29231, but extends it to also cover cases that were missed in it. As per https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#logging, LogError should be used for severe problems that require the node to shut down. ACKs for top commit: stickies-v: re-ACK fae3a1f0065064d80ab4c0375a9eaeb666c5dd55, I'm ~0 on the latest force push as `user_error` was already logged at the right level through `GetNotifications().fatalError(user_error);` so I'd be in favour of deduplicating/cleaning up this logging logic but can be done in follow-up. kevkevinpal: ACK [fae3a1f](https://github.com/bitcoin/bitcoin/pull/30255/commits/fae3a1f0065064d80ab4c0375a9eaeb666c5dd55) achow101: ACK fae3a1f0065064d80ab4c0375a9eaeb666c5dd55 Tree-SHA512: 3f99fd25d5a204d570a42d8fb2b450439aad7685692f9594cc813d97253c4df172a6ff3cf818959bfcf25dfcf8ee9a9c9ccc6028fcfcecdb47591e18c77ef246
Diffstat (limited to 'src/node')
-rw-r--r--src/node/interfaces.cpp2
-rw-r--r--src/node/kernel_notifications.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/node/interfaces.cpp b/src/node/interfaces.cpp
index 19f4aaf9c4..9e10f4ca59 100644
--- a/src/node/interfaces.cpp
+++ b/src/node/interfaces.cpp
@@ -125,7 +125,7 @@ public:
void startShutdown() override
{
if (!(*Assert(Assert(m_context)->shutdown))()) {
- LogPrintf("Error: failed to send shutdown signal\n");
+ LogError("Failed to send shutdown signal\n");
}
// Stop RPC for clean shutdown if any of waitfor* commands is executed.
if (args().GetBoolArg("-server", false)) {
diff --git a/src/node/kernel_notifications.cpp b/src/node/kernel_notifications.cpp
index 1f07014ee2..44828b8adb 100644
--- a/src/node/kernel_notifications.cpp
+++ b/src/node/kernel_notifications.cpp
@@ -63,7 +63,7 @@ kernel::InterruptResult KernelNotifications::blockTip(SynchronizationState state
uiInterface.NotifyBlockTip(state, &index);
if (m_stop_at_height && index.nHeight >= m_stop_at_height) {
if (!m_shutdown()) {
- LogPrintf("Error: failed to send shutdown signal after reaching stop height\n");
+ LogError("Failed to send shutdown signal after reaching stop height\n");
}
return kernel::Interrupted{};
}