scripted-diff: remove duplicate categories from LogPrint output #25286

pull jonatack wants to merge 1 commits into bitcoin:master from jonatack:remove-duplicate-categories-from-LogPrint-output changing 7 files +41 −41
  1. jonatack commented at 4:48 pm on June 6, 2022: member

    This is the first commit from #25203.

    • Scripted-diff: de-duplicate logging category output for the tor, i2p, net, zmq, and prune messages (e.g. where I found duplicates), as these category prefixes are now printed automatically since #24464

    examples before

    0[tor] tor: Successfully connected!
    1[i2p] I2P: Creating SAM session with 127.0.0.1:7656
    2[zmq] zmq: Initialize notification interface
    3[net] net: enabling extra block-relay-only peers
    

    after

    0[tor] Successfully connected!
    1[i2p] Creating SAM session with 127.0.0.1:7656
    2[zmq] Initialize notification interface
    3[net] enabling extra block-relay-only peers
    
  2. scripted-diff: remove duplicate categories from LogPrint output
    -BEGIN VERIFY SCRIPT-
    s() { git grep -l "$1" src | xargs sed -i "s/$1/$2/g"; }
    s 'BCLog::TOR, "tor: '       'BCLog::TOR, "'
    s 'BCLog::I2P, "I2P: '       'BCLog::I2P, "'
    s 'BCLog::NET, "net: '       'BCLog::NET, "'
    s 'BCLog::ZMQ, "zmq: '       'BCLog::ZMQ, "'
    s 'BCLog::PRUNE, "Prune: '   'BCLog::PRUNE, "'
    -END VERIFY SCRIPT-
    d40550d725
  3. klementtan commented at 5:14 pm on June 6, 2022: contributor

    crACK d40550d725fa7afd6916510164bbaa95e3ec0a5f

    Manually verified that the script correctly remove duplicate categories from LogPrint output

  4. klementtan approved
  5. DrahtBot added the label Refactoring on Jun 6, 2022
  6. DrahtBot commented at 8:55 am on June 7, 2022: member

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #25203 (logging: update to severity-based logging by jonatack)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  7. MarcoFalke commented at 9:33 am on June 7, 2022: member
    cr ACK d40550d725fa7afd6916510164bbaa95e3ec0a5f
  8. MarcoFalke removed the label Refactoring on Jun 7, 2022
  9. MarcoFalke added the label Utils/log/libs on Jun 7, 2022
  10. MarcoFalke merged this on Jun 7, 2022
  11. MarcoFalke closed this on Jun 7, 2022

  12. jonatack deleted the branch on Jun 7, 2022
  13. sidhujag referenced this in commit 566a53eb79 on Jun 8, 2022
  14. DrahtBot locked this on Jun 7, 2023

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-12-22 09:12 UTC

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