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.
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.
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]
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
No conflicts as of last run.
Concept ACK.
ACK faec0638872798b58b9882ee079014555bc8393e
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()
Moving the implementation to logging.cpp could avoid adding the compile-time dependency on util/string.h here.
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.
ACK faec0638872798b58b9882ee079014555bc8393e, I also think it's fine as it is (re #18669 (review)).