mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
Merge #11191: RPC: Improve help text and behavior of RPC-logging.
c60c49b Improve help text and behavior of RPC-logging (Akio Nakamura)
Pull request description:
1. It is allowed `libevent` logging to be updated during runtime,
but still described that restriction in the help text.
So we delete these text.
2. Add a descrption about the evaluation order of `<include>` and
`<exclude>` to clarify how debug loggig categories to be set.
3. Add a description about the available logging category `"all"`
which is not explained.
4. Add `"optional"` to the help text of `<include>` and `<exclude>`.
5. Add missing new lines before `"Argument:"`.
6. `"0"`,`"1"` are allowed in both array of `<include>` and `<exclude>`.
`"0"` is **ignored** and `"1"` is treated **same as** `"all"`.
It is confusing, so forbid them.
7. It always returns all logging categories with status.
Fix the help text to match this behavior.
Tree-SHA512: c2142da1a9bf714af8ebc38ac0d82394e2073fc0bd56f136372e3db7b2af3b6746f8d6b0241fe66c1698c208c124deb076be83f07dec0d0a180ad150593af415
This commit is contained in:
@@ -919,7 +919,8 @@ bool AppInitParameterInteraction()
|
||||
// Special-case: if -debug=0/-nodebug is set, turn off debugging messages
|
||||
const std::vector<std::string> categories = gArgs.GetArgs("-debug");
|
||||
|
||||
if (find(categories.begin(), categories.end(), std::string("0")) == categories.end()) {
|
||||
if (std::none_of(categories.begin(), categories.end(),
|
||||
[](std::string cat){return cat == "0" || cat == "none";})) {
|
||||
for (const auto& cat : categories) {
|
||||
uint32_t flag = 0;
|
||||
if (!GetLogCategory(&flag, &cat)) {
|
||||
|
||||
Reference in New Issue
Block a user