Skip to content

Commit

Permalink
node: Use log levels in noui_ThreadSafeMessageBox
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCharlatan committed Mar 21, 2024
1 parent ddc7872 commit 824f472
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/noui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,21 @@ bool noui_ThreadSafeMessageBox(const bilingual_str& message, const std::string&
switch (style) {
case CClientUIInterface::MSG_ERROR:
strCaption = "Error: ";
if (!fSecure) LogError("%s\n", message.original);
break;
case CClientUIInterface::MSG_WARNING:
strCaption = "Warning: ";
if (!fSecure) LogWarning("%s\n", message.original);
break;
case CClientUIInterface::MSG_INFORMATION:
strCaption = "Information: ";
if (!fSecure) LogInfo("%s\n", message.original);
break;
default:
strCaption = caption + ": "; // Use supplied caption (can be empty)
if (!fSecure) LogInfo("%s%s\n", strCaption, message.original);
}

if (!fSecure) {
LogPrintf("%s%s\n", strCaption, message.original);
}
tfm::format(std::cerr, "%s%s\n", strCaption, message.original);
return false;
}
Expand Down

0 comments on commit 824f472

Please sign in to comment.