diff options
author | John Newbery <john@johnnewbery.com> | 2017-04-03 13:39:11 -0400 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2017-04-10 17:05:59 -0400 |
commit | 5255aca3f42e44eb02751299e84e2cf122ed9b49 (patch) | |
tree | b61c5e177295c186263cde1a866647c5ef25e660 /src/util.h | |
parent | 4d9950d3bc72d92a0ee9a33ab3b77e097eb77354 (diff) | |
download | bitcoin-5255aca3f42e44eb02751299e84e2cf122ed9b49.tar.xz |
[rpc] Add logging RPC
Adds an RPC to get and set currently active logging categories.
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/util.h b/src/util.h index 7998449fee..ed28070a3f 100644 --- a/src/util.h +++ b/src/util.h @@ -69,6 +69,12 @@ inline std::string _(const char* psz) void SetupEnvironment(); bool SetupNetworking(); +struct CLogCategoryActive +{ + std::string category; + bool active; +}; + namespace BCLog { enum LogFlags : uint32_t { NONE = 0, @@ -102,9 +108,12 @@ static inline bool LogAcceptCategory(uint32_t category) return (logCategories.load(std::memory_order_relaxed) & category) != 0; } -/** Returns a string with the supported log categories */ +/** Returns a string with the log categories. */ std::string ListLogCategories(); +/** Returns a vector of the active log categories. */ +std::vector<CLogCategoryActive> ListActiveLogCategories(); + /** Return true if str parses as a log category and set the flags in f */ bool GetLogCategory(uint32_t *f, const std::string *str); |