Merge bitcoin/bitcoin#30255: log: use error level for critical log messages

fae3a1f006 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 fae3a1f006, 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](fae3a1f006)
  achow101:
    ACK fae3a1f006

Tree-SHA512: 3f99fd25d5a204d570a42d8fb2b450439aad7685692f9594cc813d97253c4df172a6ff3cf818959bfcf25dfcf8ee9a9c9ccc6028fcfcecdb47591e18c77ef246
This commit is contained in:
Ava Chow
2024-06-14 14:34:48 -04:00
5 changed files with 14 additions and 14 deletions

View File

@@ -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)) {