Merge bitcoin/bitcoin#32967: log: [refactor] Use info level for init logs

face8123fd log: [refactor] Use info level for init logs (MarcoFalke)
fa183761cb log: Remove function name from init logs (MarcoFalke)

Pull request description:

  Many of the normal, and expected init logs, which are run once after startup use the deprecated alias of `LogInfo`.

  Fix that by using `LogInfo` directly, which is a refactor, except for a few log lines that also have `__func__` removed.

  (Also remove the unused trailing `\n` char while touching those logs)

ACKs for top commit:
  stickies-v:
    re-ACK face8123fd
  fanquake:
    ACK face8123fd

Tree-SHA512: 28c296129c9a31dff04f529c53db75057eae8a73fc7419e2f3068963dbb7b7fb9a457b2653f9120361fdb06ac97d1ee2be815c09ac659780dff01d7cd29f8480
This commit is contained in:
merge-script
2025-07-25 12:04:44 +01:00
28 changed files with 120 additions and 115 deletions

View File

@@ -88,14 +88,14 @@ bool WalletInit::ParameterInteraction() const
{
if (gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) {
for (const std::string& wallet : gArgs.GetArgs("-wallet")) {
LogPrintf("%s: parameter interaction: -disablewallet -> ignoring -wallet=%s\n", __func__, wallet);
LogInfo("Parameter interaction: -disablewallet -> ignoring -wallet=%s", wallet);
}
return true;
}
if (gArgs.GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY) && gArgs.SoftSetBoolArg("-walletbroadcast", false)) {
LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -walletbroadcast=0\n", __func__);
LogInfo("Parameter interaction: -blocksonly=1 -> setting -walletbroadcast=0");
}
return true;
@@ -105,7 +105,7 @@ void WalletInit::Construct(NodeContext& node) const
{
ArgsManager& args = *Assert(node.args);
if (args.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) {
LogPrintf("Wallet disabled!\n");
LogInfo("Wallet disabled!");
return;
}
auto wallet_loader = node.init->makeWalletLoader(*node.chain);

View File

@@ -50,7 +50,7 @@ bool VerifyWallets(WalletContext& context)
args.ForceSetArg("-walletdir", fs::PathToString(canonical_wallet_dir));
}
LogPrintf("Using wallet directory %s\n", fs::PathToString(GetWalletDir()));
LogInfo("Using wallet directory %s", fs::PathToString(GetWalletDir()));
chain.initMessage(_("Verifying wallet(s)…"));

View File

@@ -116,8 +116,8 @@ SQLiteDatabase::SQLiteDatabase(const fs::path& dir_path, const fs::path& file_pa
{
{
LOCK(g_sqlite_mutex);
LogPrintf("Using SQLite Version %s\n", SQLiteDatabaseVersion());
LogPrintf("Using wallet %s\n", fs::PathToString(m_dir_path));
LogInfo("Using SQLite Version %s", SQLiteDatabaseVersion());
LogInfo("Using wallet %s", fs::PathToString(m_dir_path));
if (++g_sqlite_count == 1) {
// Setup logging