Fix ZMQ docs - Improve logging #7058

pull dcousens wants to merge 3 commits into bitcoin:master from dcousens:zmqdoc changing 3 files +12 −12
  1. dcousens commented at 1:35 AM on November 19, 2015: contributor

    This PR fixes the -zmq* flags (in -h) to coincide with what they actually are in the code and the docs. It also prepends the logging messages for zmq with zmq:, and adds it to the debug categories in -h.

    Docs reference: https://github.com/bitcoin/bitcoin/blob/master/doc/zmq.md#usage

    Currently, the following notifications are supported:

    -zmqpubhashtx=address
    -zmqpubhashblock=address
    -zmqpubrawblock=address
    -zmqpubrawtx=address
    

    Code reference: https://github.com/bitcoin/bitcoin/blob/master/src/zmq/zmqnotificationinterface.cpp#L38-L41

  2. init: amend ZMQ flag names cdcd816a1b
  3. init: add zmq to debug categories 14075b189d
  4. dcousens renamed this:
    init: amend ZMQ flag names
    init: amend ZMQ flag names (and add zmq to debug categories)
    on Nov 19, 2015
  5. dcousens renamed this:
    init: amend ZMQ flag names (and add zmq to debug categories)
    Improve ZMQ logging
    on Nov 19, 2015
  6. dcousens renamed this:
    Improve ZMQ logging
    Fix ZMQ docs - Imrpve logging
    on Nov 19, 2015
  7. dcousens renamed this:
    Fix ZMQ docs - Imrpve logging
    Fix ZMQ docs - Improve logging
    on Nov 19, 2015
  8. zmq: prepend zmq to debug messages ffacd27def
  9. in src/zmq/zmqnotificationinterface.cpp:None in ffacd27def
      71 | @@ -72,7 +72,7 @@ CZMQNotificationInterface* CZMQNotificationInterface::CreateWithArguments(const
      72 |  // Called at startup to conditionally set up ZMQ socket(s)
      73 |  bool CZMQNotificationInterface::Initialize()
      74 |  {
      75 | -    LogPrint("zmq", "Initialize notification interface\n");
      76 | +    LogPrint("zmq", "zmq: Initialize notification interface\n");
    


    dcousens commented at 2:33 AM on November 19, 2015:

    @laanwj maybe this should be done by LogPrint? Automatically prepend the category to the message? Thoughts?


    jonasschnelli commented at 7:15 AM on November 19, 2015:

    Right, this could be done by LogPrint (autoprint the category). But until then, it is probably best if we keep it consistent with other LogPrint's.


    MarcoFalke commented at 11:10 AM on November 19, 2015:

    Agree to get this done in the LogPrint method.

  10. in src/init.cpp:None in ffacd27def
     433 | @@ -434,7 +434,7 @@ std::string HelpMessage(HelpMessageMode mode)
     434 |          strUsage += HelpMessageOpt("-limitdescendantcount=<n>", strprintf("Do not accept transactions if any ancestor would have <n> or more in-mempool descendants (default: %u)", DEFAULT_DESCENDANT_LIMIT));
     435 |          strUsage += HelpMessageOpt("-limitdescendantsize=<n>", strprintf("Do not accept transactions if any ancestor would have more than <n> kilobytes of in-mempool descendants (default: %u).", DEFAULT_DESCENDANT_SIZE_LIMIT));
     436 |      }
     437 | -    string debugCategories = "addrman, alert, bench, coindb, db, lock, rand, rpc, selectcoins, mempool, mempoolrej, net, proxy, prune, http, libevent"; // Don't translate these and qt below
     438 | +    string debugCategories = "addrman, alert, bench, coindb, db, lock, rand, rpc, selectcoins, mempool, mempoolrej, net, proxy, prune, http, libevent, zmq"; // Don't translate these and qt below
     439 |      if (mode == HMM_BITCOIN_QT)
    


    jmcorgan commented at 3:12 AM on November 19, 2015:

    Do you think the zmq system merits its own debug category? It's really the the first instance of a "notification" system, which might include other methods in the future.

    It's not that big a deal; just double checking if this is the right way to go.


    dcousens commented at 3:15 AM on November 19, 2015:

    @jmcorgan this is already the case, I'm just exposing what is already there. If you want rename it to notifications:, sure.

    These messages are helpful when debugging, absolutely.


    laanwj commented at 9:45 AM on November 24, 2015:

    @jmcorgan IMO it does. I think it's good to have different modules use a different debug category, even if they belong to the same logical grouping. Debugging is either very targeted 'I want to see this debug message' or 'I want to see all debugging messages', rarely in between.

  11. jmcorgan commented at 4:02 AM on November 19, 2015: contributor

    @dcousens No worries. utACK.

  12. jonasschnelli commented at 7:15 AM on November 19, 2015: contributor

    Nice catch with the wrong help message! utACK.

  13. laanwj added the label Docs and Output on Nov 19, 2015
  14. dcousens commented at 4:23 PM on November 24, 2015: contributor

    Anything holding this up @laanwj ?

  15. MarcoFalke commented at 4:29 PM on November 24, 2015: member

    utACK ffacd27

  16. laanwj merged this on Nov 27, 2015
  17. laanwj closed this on Nov 27, 2015

  18. laanwj referenced this in commit 9a3e1a59df on Nov 27, 2015
  19. dcousens deleted the branch on Nov 27, 2015
  20. luke-jr referenced this in commit 3a5c4be89c on Dec 1, 2015
  21. luke-jr referenced this in commit d8593d8361 on Dec 1, 2015
  22. luke-jr referenced this in commit 4baa4fa8d9 on Dec 1, 2015
  23. zkbot referenced this in commit 36df5a92f8 on Feb 9, 2017
  24. zkbot referenced this in commit dd8b38316f on Feb 9, 2017
  25. zkbot referenced this in commit 253c610783 on Feb 9, 2017
  26. MarcoFalke 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: 2026-04-13 21:15 UTC

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