wallet: use LogTrace for walletdb log messages at trace level #30355

pull ajtowns wants to merge 1 commits into bitcoin:master from ajtowns:202406-walletlogtrace changing 1 files +1 −1
  1. ajtowns commented at 7:46 am on June 28, 2024: contributor

    Wallet sqlite logging is enabled by -debug=walletdb -loglevel=walletdb:trace however the actual log messages are sent at BCLog::Level::Info. Switch to the trace level to make this consistent. This adds [walletdb:trace] to the log output, eg:

    0[httpworker.3] [wallet/sqlite.cpp:55] [TraceSqlCallback] [/tmp/bitcoin_func_test_4fsnatpg/node0/regtest/wallets/boring/wallet.dat] SQLite Statement: BEGIN EXCLUSIVE TRANSACTION
    

    becomes

    0[httpworker.0] [wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/tmp/bitcoin_func_test_9lcwth4z/node0/regtest/wallets/boring/wallet.dat] SQLite Statement: BEGIN EXCLUSIVE TRANSACTION
    
  2. wallet: use LogTrace for walletdb log messages at trace level 46819f5df6
  3. DrahtBot commented at 7:46 am on June 28, 2024: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko, ryanofsky

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    No conflicts as of last run.

  4. DrahtBot added the label Wallet on Jun 28, 2024
  5. maflcko commented at 9:00 am on June 28, 2024: member

    ACK 46819f5df6de2a860c3ec87d55527b617a3b128f

    Makes sense to use the severity level and category that the user asked for, instead of a different one.

    Could also change it to [warn] when the user request could not be fulfilled?

    https://github.com/bitcoin/bitcoin/blob/46819f5df6de2a860c3ec87d55527b617a3b128f/src/wallet/sqlite.cpp#L270

  6. ryanofsky approved
  7. ryanofsky commented at 10:30 pm on June 28, 2024: contributor
    Code review ACK 46819f5df6de2a860c3ec87d55527b617a3b128f. Nice catch!
  8. bitcoin deleted a comment on Jun 28, 2024

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: 2024-07-03 10:13 UTC

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