log: Use Join() helper when listing log categories #18669

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2004-logJoin changing 4 files +17 −31
  1. MarcoFalke commented at 3:14 PM on April 16, 2020: member

    This removes the global ListLogCategories and replaces it with a one-line member function LogCategoriesString, which just calls Join.

    Should be a straightforward refactor to get rid of a few LOC.

  2. log: Use Join() helper when listing log categories faec063887
  3. MarcoFalke added the label Refactoring on Apr 16, 2020
  4. MarcoFalke commented at 3:30 PM on April 16, 2020: member

    Rendered diff (nothing changes except commit hash):

    @@ -1,4 +1,4 @@
    -Bitcoin Core version v0.20.99.0-79b0459648
    +Bitcoin Core version v0.20.99.0-faec063887
     
     Usage:  bitcoin-qt [command-line options]                     
     
    
  5. DrahtBot commented at 8:00 PM on April 16, 2020: member

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

  6. hebasto commented at 1:00 AM on April 22, 2020: member

    Concept ACK.

  7. laanwj commented at 12:29 PM on April 22, 2020: member

    ACK faec0638872798b58b9882ee079014555bc8393e

  8. in src/logging.h:138 in faec063887
     131 | @@ -132,6 +132,13 @@ namespace BCLog {
     132 |          bool DisableCategory(const std::string& str);
     133 |  
     134 |          bool WillLogCategory(LogFlags category) const;
     135 | +        /** Returns a vector of the log categories */
     136 | +        std::vector<LogCategory> LogCategoriesList();
     137 | +        /** Returns a string with the log categories */
     138 | +        std::string LogCategoriesString()
    


    laanwj commented at 12:30 PM on April 22, 2020:

    Moving the implementation to logging.cpp could avoid adding the compile-time dependency on util/string.h here.


    MarcoFalke commented at 12:38 PM on April 22, 2020:

    util/string.h is relatively trivial to parse for a compiler, compared to serialize.h or the boost fs.h, so I thought it could be ok to include it here.

    Happy to change though. You gave it an ACK, so let me know if I should invalidate that.

  9. promag commented at 11:47 PM on April 26, 2020: member

    ACK faec0638872798b58b9882ee079014555bc8393e, I also think it's fine as it is (re #18669 (review)).

  10. MarcoFalke merged this on Apr 26, 2020
  11. MarcoFalke closed this on Apr 26, 2020

  12. MarcoFalke deleted the branch on Apr 26, 2020
  13. sidhujag referenced this in commit f0c1aa42b9 on Apr 27, 2020
  14. Fabcien referenced this in commit f9ec355922 on Jan 21, 2021
  15. DrahtBot locked this on Feb 15, 2022

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-17 06:14 UTC

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