make check
./bitcoind
./bitcoin-cli help
`logging` rpc should not show up because it is marked as `hidden`.
./bitcoin-cli help logging
This should display `logging` rpc help
./bitcoin-cli logging
This should display the list of logging options all set to false (default).
./bitcoin-cli logging "[\"all"\"]
./bitcoin-cli getbestblockhash
check debug.log
The first line should output the list of logging options all set to true if your libevent version is at or above v2.1.1. Otherwise, every option except libevent will be set to true.
The second line should cause the logger to write some extra debug information to the `debug.log` file.
./bitcoin-cli logging "[]" "[\"all\"]"
./bitcoin-cli getbestblockhash
check debug.log
The first line should output the list of logging options all set to false again.
The second line should cause the logger to revert back to its original logging behavior, outputting no extra logging information to `debug.log`.
./bitcoin-cli logging "[\"libevent"\"]
If your version of libevent is below v2.1.1, you should receive an error stating `libevent logging cannot be updated when using libevent before v2.1.1.` If your libevent is version is at or above 2.1.1, then it should proceed as normal. Tested by changing line 431 in httpserver.cpp from `#if LIBEVENT_VERSION_NUMBER >= 0x02010100` to `#if LIBEVENT_VERSION_NUMBER < 0x02010100`.