wallet: Log absolute paths for the wallets #15334

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:20190203-wallet-env-log changing 1 files +1 −1
  1. hebasto commented at 7:42 PM on February 3, 2019: member

    Fix #15333

    debug.log with this PR:

    ...
    2019-02-03T19:02:35Z Using wallet directory /home/hebasto/.bitcoin/testnet3/wallets
    2019-02-03T19:02:35Z init message: Verifying wallet(s)...
    2019-02-03T19:02:35Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
    2019-02-03T19:02:35Z Using wallet test_alpha/wallet.dat
    2019-02-03T19:02:35Z BerkeleyEnvironment::Open: LogDir=/home/hebasto/.bitcoin/testnet3/wallets/test_alpha/database ErrorFile=/home/hebasto/.bitcoin/testnet3/wallets/test_alpha/db.log
    2019-02-03T19:02:35Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
    2019-02-03T19:02:35Z Using wallet alpha_wallet/wallet.dat
    2019-02-03T19:02:35Z BerkeleyEnvironment::Open: LogDir=/home/hebasto/.bitcoin/testnet3/wallets/alpha_wallet/database ErrorFile=/home/hebasto/.bitcoin/testnet3/wallets/alpha_wallet/db.log
    2019-02-03T19:02:35Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
    2019-02-03T19:02:35Z Using wallet wallet.dat
    2019-02-03T19:02:35Z BerkeleyEnvironment::Open: LogDir=/home/hebasto/.bitcoin/testnet3/wallets/database ErrorFile=/home/hebasto/.bitcoin/testnet3/wallets/db.log
    2019-02-03T19:02:35Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
    2019-02-03T19:02:35Z Using wallet none/wallet.dat
    2019-02-03T19:02:35Z BerkeleyEnvironment::Open: LogDir=/home/hebasto/.bitcoin/testnet3/wallets/none/database ErrorFile=/home/hebasto/.bitcoin/testnet3/wallets/none/db.log
    2019-02-03T19:02:35Z init message: Loading banlist...
    ...
    
  2. practicalswift commented at 8:51 PM on February 3, 2019: contributor

    Concept ACK

  3. in src/wallet/db.cpp:392 in bb5386c70a outdated
     388 | @@ -389,7 +389,11 @@ bool BerkeleyBatch::VerifyEnvironment(const fs::path& file_path, std::string& er
     389 |      fs::path walletDir = env->Directory();
     390 |  
     391 |      LogPrintf("Using BerkeleyDB version %s\n", DbEnv::version(nullptr, nullptr, nullptr));
     392 | -    LogPrintf("Using wallet %s\n", walletFile);
    


    promag commented at 10:11 PM on February 3, 2019:

    Could show absolute path instead (file_path)?


    hebasto commented at 10:22 PM on February 12, 2019:

    Done.

  4. fanquake added the label Wallet on Feb 3, 2019
  5. in src/wallet/db.cpp:395 in bb5386c70a outdated
     388 | @@ -389,7 +389,11 @@ bool BerkeleyBatch::VerifyEnvironment(const fs::path& file_path, std::string& er
     389 |      fs::path walletDir = env->Directory();
     390 |  
     391 |      LogPrintf("Using BerkeleyDB version %s\n", DbEnv::version(nullptr, nullptr, nullptr));
     392 | -    LogPrintf("Using wallet %s\n", walletFile);
     393 | +    if (GetWalletDir() == walletDir) {
     394 | +        LogPrintf("Using wallet %s\n", walletFile);
     395 | +    } else {
     396 | +        LogPrintf("Using wallet %s\n", (fs::path(walletDir).filename() / walletFile).string());
    


    practicalswift commented at 9:32 PM on February 4, 2019:

    Redundant cast? fs::path(walletDir).filename() should be written walletDir.filename()? :-)


    hebasto commented at 12:03 AM on February 5, 2019:

    @practicalswift right :)

    I'm going to implement @promag's suggestion about absolute paths.

  6. meshcollider commented at 8:58 PM on February 5, 2019: contributor

    Concept ACK

  7. hebasto force-pushed on Feb 12, 2019
  8. hebasto commented at 10:21 PM on February 12, 2019: member

    @promag's comment has been addressed.

  9. hebasto renamed this:
    wallet: Log subdirectory for the named wallets
    wallet: Log absolute pathes for the wallets
    on Feb 12, 2019
  10. promag commented at 10:37 PM on February 12, 2019: member

    I think this is preferable, configuration can change but logs reflect the configuration at the time.

    Typo in commit message, plural of path is paths.

    Otherwise utACK a4b92e467dd182621497deda1e80a9737629c75f 6b0ec30.

  11. Log full paths for wallets a4b92e467d
  12. hebasto force-pushed on Feb 12, 2019
  13. hebasto commented at 10:49 PM on February 12, 2019: member

    Typo in commit message, plural of path is paths.

    Fixed.

  14. hebasto renamed this:
    wallet: Log absolute pathes for the wallets
    wallet: Log absolute paths for the wallets
    on Feb 12, 2019
  15. laanwj commented at 9:45 PM on February 13, 2019: member

    tACK a4b92e467dd182621497deda1e80a9737629c75f

  16. laanwj merged this on Feb 13, 2019
  17. laanwj closed this on Feb 13, 2019

  18. laanwj referenced this in commit 9c93f5d9fc on Feb 13, 2019
  19. hebasto deleted the branch on Feb 14, 2019
  20. deadalnix referenced this in commit 59aae41403 on Sep 3, 2020
  21. vijaydasmp referenced this in commit 3eb2321476 on Sep 12, 2021
  22. vijaydasmp referenced this in commit 6daee84037 on Sep 12, 2021
  23. vijaydasmp referenced this in commit 1ba215c3f1 on Sep 13, 2021
  24. vijaydasmp referenced this in commit ad43fe9574 on Sep 13, 2021
  25. vijaydasmp referenced this in commit ac9c5d6548 on Sep 13, 2021
  26. vijaydasmp referenced this in commit 1efb500783 on Sep 13, 2021
  27. PastaPastaPasta referenced this in commit 78e04b92f2 on Sep 16, 2021
  28. MarcoFalke locked this on Dec 16, 2021

github-metadata-mirror

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: 2026-04-15 00:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me