@@ -403,7 +403,7 @@ static void HandleSIGHUP(int)
403
403
static BOOL WINAPI consoleCtrlHandler (DWORD dwCtrlType)
404
404
{
405
405
if (!(*Assert (g_shutdown))()) {
406
- LogPrintf ( " Error: failed to send shutdown signal on Ctrl-C\n " );
406
+ LogError ( " Failed to send shutdown signal on Ctrl-C\n " );
407
407
return false ;
408
408
}
409
409
Sleep (INFINITE);
@@ -834,7 +834,7 @@ std::set<BlockFilterType> g_enabled_filter_types;
834
834
// Since LogPrintf may itself allocate memory, set the handler directly
835
835
// to terminate first.
836
836
std::set_new_handler (std::terminate);
837
- LogPrintf ( " Error: Out of memory. Terminating.\n " );
837
+ LogError ( " Out of memory. Terminating.\n " );
838
838
839
839
// The log was successful, terminate now.
840
840
std::terminate ();
@@ -1169,9 +1169,9 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
1169
1169
scheduler.scheduleEvery ([&args, &node]{
1170
1170
constexpr uint64_t min_disk_space = 50 << 20 ; // 50 MB
1171
1171
if (!CheckDiskSpace (args.GetBlocksDirPath (), min_disk_space)) {
1172
- LogPrintf (" Shutting down due to lack of disk space!\n " );
1172
+ LogError (" Shutting down due to lack of disk space!\n " );
1173
1173
if (!(*Assert (node.shutdown ))()) {
1174
- LogPrintf ( " Error: failed to send shutdown signal after disk space check\n " );
1174
+ LogError ( " Failed to send shutdown signal after disk space check\n " );
1175
1175
}
1176
1176
}
1177
1177
}, std::chrono::minutes{5 });
@@ -1576,7 +1576,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
1576
1576
try {
1577
1577
return f ();
1578
1578
} catch (const std::exception& e) {
1579
- LogPrintf (" %s\n " , e.what ());
1579
+ LogError (" %s\n " , e.what ());
1580
1580
return std::make_tuple (node::ChainstateLoadStatus::FAILURE, _ (" Error opening block database" ));
1581
1581
}
1582
1582
};
@@ -1608,10 +1608,10 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
1608
1608
if (fRet ) {
1609
1609
chainman.m_blockman .m_reindexing = true ;
1610
1610
if (!Assert (node.shutdown )->reset ()) {
1611
- LogPrintf (" Internal error: failed to reset shutdown signal.\n " );
1611
+ LogError (" Internal error: failed to reset shutdown signal.\n " );
1612
1612
}
1613
1613
} else {
1614
- LogPrintf (" Aborted block database rebuild. Exiting.\n " );
1614
+ LogError (" Aborted block database rebuild. Exiting.\n " );
1615
1615
return false ;
1616
1616
}
1617
1617
} else {
@@ -1746,7 +1746,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
1746
1746
if (args.GetBoolArg (" -stopafterblockimport" , DEFAULT_STOPAFTERBLOCKIMPORT)) {
1747
1747
LogPrintf (" Stopping after block import\n " );
1748
1748
if (!(*Assert (node.shutdown ))()) {
1749
- LogPrintf ( " Error: failed to send shutdown signal after finishing block import\n " );
1749
+ LogError ( " Failed to send shutdown signal after finishing block import\n " );
1750
1750
}
1751
1751
return ;
1752
1752
}
0 commit comments