diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-04-12 17:48:58 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-04-12 19:57:22 +0200 |
commit | 350b22497c7ce8afea8ebf6129571056dfd11a80 (patch) | |
tree | 7ad3a55dbfd7b49110dd78fea5c647232c50daa8 /src/util.h | |
parent | b44adf92342ad4f9c343ba29c081a91687932936 (diff) | |
parent | 7fd50c3b70397c0dc39093a7a4ddbf9b36a615cf (diff) | |
download | bitcoin-350b22497c7ce8afea8ebf6129571056dfd11a80.tar.xz |
Merge #10150: [rpc] Add logging rpc
7fd50c3 allow libevent logging to be updated during runtime (John Newbery)
5255aca [rpc] Add logging RPC (John Newbery)
4d9950d Set BCLog::LIBEVENT correctly for old libevent versions. (John Newbery)
Tree-SHA512: d6788a7205372c0528da71eca052910dfb055f2940ca884f422ff3db66e23a2b49c6a15b8f27d5255554fe5c5a928f5dd903fdc63b0bd6c8fa7783e77bb30fe8
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); |