Skip to content

Commit 824f472

Browse files
committed
node: Use log levels in noui_ThreadSafeMessageBox
1 parent ddc7872 commit 824f472

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/noui.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,21 @@ bool noui_ThreadSafeMessageBox(const bilingual_str& message, const std::string&
2828
switch (style) {
2929
case CClientUIInterface::MSG_ERROR:
3030
strCaption = "Error: ";
31+
if (!fSecure) LogError("%s\n", message.original);
3132
break;
3233
case CClientUIInterface::MSG_WARNING:
3334
strCaption = "Warning: ";
35+
if (!fSecure) LogWarning("%s\n", message.original);
3436
break;
3537
case CClientUIInterface::MSG_INFORMATION:
3638
strCaption = "Information: ";
39+
if (!fSecure) LogInfo("%s\n", message.original);
3740
break;
3841
default:
3942
strCaption = caption + ": "; // Use supplied caption (can be empty)
43+
if (!fSecure) LogInfo("%s%s\n", strCaption, message.original);
4044
}
4145

42-
if (!fSecure) {
43-
LogPrintf("%s%s\n", strCaption, message.original);
44-
}
4546
tfm::format(std::cerr, "%s%s\n", strCaption, message.original);
4647
return false;
4748
}

0 commit comments

Comments
 (0)