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)
Our logging code was refactored some time ago in a way that looks a lot like Core PR12954. Functionally, however, we are still behind in comparison to Core when their refactor occurred. That has made this backport very complicated. I have made comments on each change that directly link to the PR it was backported from to assist in review. As mentioned in the summary, some changes had to be modified to bridge the gap between the state of Core's logging code before and after the refactor in PR12954.
Backport of Core PR10150:
As is, Core's logging code as seen in PR10150 is incompatible with our own logging code. I Also pulled the EnableOrDisableLogCategories() function and the updated libevent filter code and Logger::GetCategoryMask() function from Core PR12954 which is a refactor of Core's logging code that makes it more closely mirror our own.