Skip to content

Commit e60fc7d

Browse files
committed
logging: Replace uses of LogPrintfCategory
Replace LogPrintfCategory with alternative unconditional log statements.
1 parent f7ce5ac commit e60fc7d

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

src/httpserver.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ bool InitHTTPServer()
412412

413413
LogPrint(BCLog::HTTP, "Initialized HTTP server\n");
414414
int workQueueDepth = std::max((long)gArgs.GetIntArg("-rpcworkqueue", DEFAULT_HTTP_WORKQUEUE), 1L);
415-
LogPrintfCategory(BCLog::HTTP, "creating work queue of depth %d\n", workQueueDepth);
415+
LogDebug(BCLog::HTTP, "creating work queue of depth %d\n", workQueueDepth);
416416

417417
g_work_queue = std::make_unique<WorkQueue<HTTPClosure>>(workQueueDepth);
418418
// transfer ownership to eventBase/HTTP via .release()
@@ -434,9 +434,8 @@ static std::vector<std::thread> g_thread_http_workers;
434434

435435
void StartHTTPServer()
436436
{
437-
LogPrint(BCLog::HTTP, "Starting HTTP server\n");
438437
int rpcThreads = std::max((long)gArgs.GetIntArg("-rpcthreads", DEFAULT_HTTP_THREADS), 1L);
439-
LogPrintfCategory(BCLog::HTTP, "starting %d worker threads\n", rpcThreads);
438+
LogInfo("Starting HTTP server with %d worker threads\n", rpcThreads);
440439
g_thread_http = std::thread(ThreadHTTP, eventBase);
441440

442441
for (int i = 0; i < rpcThreads; i++) {

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1503,7 +1503,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
15031503
if (status == node::ChainstateLoadStatus::SUCCESS) {
15041504
uiInterface.InitMessage(_("Verifying blocks…").translated);
15051505
if (chainman.m_blockman.m_have_pruned && options.check_blocks > MIN_BLOCKS_TO_KEEP) {
1506-
LogPrintfCategory(BCLog::PRUNE, "pruned datadir may not have more than %d blocks; only checking available blocks\n",
1506+
LogWarning("pruned datadir may not have more than %d blocks; only checking available blocks\n",
15071507
MIN_BLOCKS_TO_KEEP);
15081508
}
15091509
std::tie(status, error) = catch_exceptions([&]{ return VerifyLoadedChainstate(chainman, options);});

src/net_processing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4326,7 +4326,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
43264326
}
43274327

43284328
if (received_new_header) {
4329-
LogPrintfCategory(BCLog::NET, "Saw new cmpctblock header hash=%s peer=%d\n",
4329+
LogInfo("Saw new cmpctblock header hash=%s peer=%d\n",
43304330
blockhash.ToString(), pfrom.GetId());
43314331
}
43324332

src/torcontrol.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ void TorController::add_onion_cb(TorControlConnection& _conn, const TorControlRe
433433
return;
434434
}
435435
service = LookupNumeric(std::string(service_id+".onion"), Params().GetDefaultPort());
436-
LogPrintfCategory(BCLog::TOR, "Got service ID %s, advertising service %s\n", service_id, service.ToStringAddrPort());
436+
LogInfo("Got tor service ID %s, advertising service %s\n", service_id, service.ToStringAddrPort());
437437
if (WriteBinaryFile(GetPrivateKeyFile(), private_key)) {
438438
LogPrint(BCLog::TOR, "Cached service private key to %s\n", fs::PathToString(GetPrivateKeyFile()));
439439
} else {

0 commit comments

Comments
 (0)