Allow debug logs to be excluded from specified component #10123

pull jnewbery wants to merge 1 commits into bitcoin:master from jnewbery:debugexclude changing 1 files +14 −1
  1. jnewbery commented at 3:32 pm on March 30, 2017: member

    setting -debug can lead to very noisy debug.logs with subcomponents filling up the log file. See for example https://travis-ci.org/bitcoin/bitcoin/jobs/216767286 where there are hundreds of libevent debug logs.

    This commit adds an option to exclude certain components from debug logging. The usage is:

    0bitcoind -debug -debugexclude=<component1> -debugexclude=<component2> ...
    
  2. TheBlueMatt commented at 3:39 pm on March 30, 2017: member
    utACK 3f1cbd38896cea8cea3095aad0a23254a39f651e
  3. JeremyRubin commented at 4:22 pm on March 30, 2017: contributor

    utACK 3f1cbd3.

    Might be good to clean the category code up in another PR.

  4. jnewbery commented at 5:23 pm on March 30, 2017: member
    @JeremyRubin agree - this could be optimized so we don’t do a std::string.count() every time LogPrint() is called. I think that’s an improvement for a different PR. This doesn’t make things particularly worse.
  5. fanquake added the label Utils and libraries on Mar 30, 2017
  6. jnewbery commented at 8:48 pm on March 31, 2017: member
    Closing until #9424 is merged.
  7. jnewbery closed this on Mar 31, 2017

  8. laanwj commented at 6:56 am on April 2, 2017: member
    #9424 was merged
  9. jnewbery commented at 11:53 pm on April 2, 2017: member

    Reimplemented on top of the new logging categories infrastructure from #9424. As expected, it’s about 10 lines of code.

    Requesting review from @gmaxwell .

  10. jnewbery reopened this on Apr 2, 2017

  11. jnewbery closed this on Apr 2, 2017

  12. jnewbery force-pushed on Apr 2, 2017
  13. jnewbery reopened this on Apr 2, 2017

  14. in src/init.cpp:917 in 39a70f26d9 outdated
    914@@ -914,13 +915,25 @@ bool AppInitParameterInteraction()
    915             for (const auto& cat : categories) {
    916                 uint32_t flag;
    917                 if (!GetLogCategory(&flag, &cat)) {
    918-                    InitWarning(strprintf(_("Unsupported logging category %s.\n"), cat));
    


    laanwj commented at 10:23 am on April 3, 2017:
    To not give the translators extra work, please try to use the same translation message as below. You could add a %s for the option.

    jnewbery commented at 1:05 pm on April 3, 2017:
    Good point. Changed.
  15. laanwj commented at 10:29 am on April 3, 2017: member
  16. Add -debugexclude option to switch off logging for specified components 3bde556429
  17. jnewbery force-pushed on Apr 3, 2017
  18. jnewbery commented at 1:05 pm on April 3, 2017: member
    @laanwj’s nit fixed and squashed.
  19. laanwj merged this on Apr 3, 2017
  20. laanwj closed this on Apr 3, 2017

  21. laanwj referenced this in commit 471ed00fcd on Apr 3, 2017
  22. jnewbery deleted the branch on Apr 3, 2017
  23. PastaPastaPasta referenced this in commit ddd9b0dbac on May 12, 2019
  24. PastaPastaPasta referenced this in commit 7b9a01e711 on May 12, 2019
  25. UdjinM6 referenced this in commit b49d904426 on May 16, 2019
  26. PastaPastaPasta referenced this in commit 92b9de7cda on May 17, 2019
  27. PastaPastaPasta referenced this in commit 29aa826696 on May 21, 2019
  28. PastaPastaPasta referenced this in commit 7c3056c30b on May 21, 2019
  29. PastaPastaPasta referenced this in commit 456e1321a0 on May 21, 2019
  30. PastaPastaPasta referenced this in commit 0007611c75 on May 22, 2019
  31. PastaPastaPasta referenced this in commit 34e954a0d0 on May 22, 2019
  32. UdjinM6 referenced this in commit 29194b1f5a on May 22, 2019
  33. barrystyle referenced this in commit b773a6230f on Jan 22, 2020
  34. random-zebra referenced this in commit eb1ed66c2e on Apr 4, 2020
  35. DrahtBot locked this on Sep 8, 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: 2024-12-19 03:12 UTC

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