log: log RPC port on startup #26131

pull jamesob wants to merge 1 commits into bitcoin:master from jamesob:jamesob-22-09-log-rpc-port changing 1 files +1 −1
  1. jamesob commented at 1:43 am on September 20, 2022: member

    I just spent a few hours trying to figure out why “18444” wasn’t getting me to regtest’s RPC server. I’m not the sharpest tool in the shed, but I was maybe understandably confused because “Bound to 127.0.0.1:18445” appears in the logs, which I assumed was the P2P port.

    This change logs the RPC listening address by default on startup, which seems like a basic piece of information that shouldn’t be buried under -debug.

  2. log: log RPC port on startup
    I just spent a few hours trying to figure out why "18444" wasn't getting
    me to regtest's RPC server. I'm not the sharpest tool in the shed, but I
    was maybe understandably confused because "Bound to
    127.0.0.1:18445" appears in the logs, which I assumed was the P2P port.
    
    This change logs the RPC listening address, which seems like a basic
    piece of information that shouldn't be buried in debug logs.
    9d14f27bdd
  3. jamesob force-pushed on Sep 20, 2022
  4. DrahtBot added the label Utils/log/libs on Sep 20, 2022
  5. jarolrod approved
  6. jarolrod commented at 4:37 am on September 20, 2022: member

    ACK 9d14f27bddab351fe98a2ae197bd4cf8a092c4f3

    I agree this is useful information to log

    02022-09-20T04:34:30Z Binding RPC on address ::1 port 18443
    12022-09-20T04:34:30Z Binding RPC on address 127.0.0.1 port 18443
    
  7. MarcoFalke commented at 6:34 am on September 20, 2022: member
    Wouldn’t the solution be to set the log level to INFO?
  8. in src/httpserver.cpp:323 in 9d14f27bdd
    319@@ -320,7 +320,7 @@ static bool HTTPBindAddresses(struct evhttp* http)
    320 
    321     // Bind addresses
    322     for (std::vector<std::pair<std::string, uint16_t> >::iterator i = endpoints.begin(); i != endpoints.end(); ++i) {
    323-        LogPrint(BCLog::HTTP, "Binding RPC on address %s port %i\n", i->first, i->second);
    324+        LogPrintf("Binding RPC on address %s port %i\n", i->first, i->second);
    


    jonatack commented at 6:59 am on September 20, 2022:
    0        LogPrintLevel(BCLog::HTTP, BCLog::Level::Info, "Binding RPC on address %s port %i\n", i->first, i->second);
    

    jamesob commented at 12:24 pm on September 20, 2022:
    Maybe I’m doing something wrong but this change with ./src/bitcoind -regtest -rpcbind=127.0.0.1 -rpcallowip=127.0.0.1/0 doesn’t appear to display this log.

    aureleoules commented at 1:25 pm on September 20, 2022:
    me neither, it needs -debug=http

    jonatack commented at 8:15 am on September 21, 2022:
    Info levels will be unconditionally logged if 118c7567f62df2b88 is merged. For now, only warning and error messages are unconditionally logged. Feel free to leave it as LogPrint{f} for now and it will be updated in one of the #25203 steps.

    jamesob commented at 7:34 pm on September 21, 2022:
    I’m going to leave this as is; think this makes sense to merge sooner rather than later.
  9. dergoegge commented at 7:29 pm on September 21, 2022: member

    ACK 9d14f27bddab351fe98a2ae197bd4cf8a092c4f3

    I have also spent time in the past looking for the correct ports, so this makes sense to me.

  10. DrahtBot commented at 3:21 am on September 23, 2022: contributor

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

    Conflicts

    No conflicts as of last run.

  11. jamesob commented at 1:55 pm on September 30, 2022: member
    Good for merge?
  12. aureleoules approved
  13. aureleoules commented at 2:18 pm on September 30, 2022: member
    ACK 9d14f27bddab351fe98a2ae197bd4cf8a092c4f3
  14. MarcoFalke merged this on Sep 30, 2022
  15. MarcoFalke closed this on Sep 30, 2022

  16. sidhujag referenced this in commit 5bb474a7c8 on Oct 4, 2022
  17. bitcoin locked this on Sep 30, 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-26 12:12 UTC

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