Include the wallet name in log messages relating to wallets #11320
pull dooglus wants to merge 1 commits into bitcoin:master from dooglus:wallet_name_in_log changing 5 files +50 −49-
dooglus commented at 3:28 pm on September 13, 2017: contributorFor #11317.
-
dooglus force-pushed on Sep 13, 2017
-
promag commented at 7:43 pm on September 13, 2017: member
How about something along one of these:
WalletLogPrintf(pwallet, ...);
pwallet->LogPrintf(...);
-
fanquake added the label Wallet on Sep 14, 2017
-
jnewbery commented at 7:09 pm on September 14, 2017: memberTested ACK 9d68be4d868b31456bc22cb005c12ed650ca3ac0
-
TheBlueMatt commented at 6:48 pm on September 15, 2017: member
Do you want to include the wallet in the SELECTIONS debug prints? I dont really care either way cause it should be obvious, but for completeness figured I’d mention it.
utACK 9d68be4d868b31456bc22cb005c12ed650ca3ac0. I don’t hugely care about having a WalletLogPrintf function/macro, its not all that different, but if you find it cleaner, do it.
-
dooglus force-pushed on Sep 15, 2017
-
Include the wallet name in log messages relating to wallets f197a4c515
-
dooglus force-pushed on Sep 15, 2017
-
dooglus commented at 7:52 pm on September 15, 2017: contributor
I added the wallet name to the SELECTCOINS message, and in four other places:
- LogPrint(BCLog::RPC, "Bumping fee and discarding dust output\n"); + LogPrint(BCLog::RPC, "[%s] Bumping fee and discarding dust output\n", pWallet->GetName()); - LogPrintf("Error getting wallet database cursor\n"); + LogPrintf("[%s] Error getting wallet database cursor\n", pwallet->GetName()); - LogPrintf("Error reading next record from wallet database\n"); + LogPrintf("[%s] Error reading next record from wallet database\n", pwallet->GetName()); - LogPrintf("%s\n", strErr); + LogPrintf("[%s] %s\n", pwallet->GetName(), strErr);
then rebased.
-
in src/wallet/db.cpp:231 in f197a4c515
228@@ -229,7 +229,7 @@ bool CDB::Recover(const std::string& filename, void *callbackDataIn, bool (*reco 229 bool CDB::VerifyEnvironment(const std::string& walletFile, const fs::path& dataDir, std::string& errorStr) 230 { 231 LogPrintf("Using BerkeleyDB version %s\n", DbEnv::version(0, 0, 0));
jonasschnelli commented at 3:01 am on September 16, 2017:Not really related, but this gets logged by-wallet
instance? Maybe a better approach would be to do a single"Using wallets [x,y,z]\n"
would be better?jonasschnelli commented at 3:05 am on September 16, 2017: contributorutACK f197a4c515757262eda0accbe762e311335be11b I think we should be careful with adding more direct access topWallet
since we are planing to add dynamic loading/unloading.laanwj commented at 1:57 pm on September 26, 2017: memberConcept ACK. We probably want to wait to merge this until 0.15.1/segwit wallet is released to prevent rebasing issues due to logging.
I think we should be careful with adding more direct access to pWalletsince we are planing to add dynamic loading/unloading.
Agree here.
laanwj added this to the milestone 0.16.0 on Sep 26, 2017luke-jr commented at 9:37 am on November 10, 2017: memberConcept ACK. I likepwallet->LogPrintf(...);
laanwj removed this from the milestone 0.16.0 on Jan 11, 2018laanwj added this to the milestone 0.17.0 on Jan 11, 2018in src/wallet/wallet.cpp:1571 in f197a4c515
1567@@ -1568,16 +1568,16 @@ CBlockIndex* CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool f 1568 fAbortRescan = false; 1569 fScanningWallet = true; 1570 1571- ShowProgress(_("Rescanning..."), 0); // show rescan progress in GUI as dialog or on splashscreen, if -rescan on startup 1572+ ShowProgress(strprintf(_("[%s] Rescanning..."), GetName()), 0); // show rescan progress in GUI as dialog or on splashscreen, if -rescan on startup
PierreRochard commented at 9:21 pm on February 12, 2018:The ShowProgress in line 490 of rpcdump for import wallet ( https://github.com/dooglus/bitcoin/blob/f197a4c515757262eda0accbe762e311335be11b/src/wallet/rpcdump.cpp#L490 )was not modified to indicate the wallet name, I thought it was deliberate due to the difference between GUI and log, but then saw this.PierreRochard commented at 6:00 pm on April 12, 2018: contributor@dooglus this is a good PR with unanimous concept ACKs, do you mind if I rebase your commit in a new PR so that we can get it in for 0.17?dooglus commented at 3:17 pm on April 13, 2018: contributor@PierreRochard I don’t mind at all. Please do so.MarcoFalke closed this on Apr 15, 2018
DrahtBot locked this on Sep 8, 2021
dooglus promag jnewbery TheBlueMatt jonasschnelli laanwj luke-jr sipa PierreRochardLabels
WalletMilestone
0.17.0
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 09:12 UTC
More mirrored repositories can be found on mirror.b10c.me