aboutsummaryrefslogtreecommitdiff
path: root/src/httpserver.cpp
diff options
context:
space:
mode:
authorFabian Jahr <fjahr@protonmail.com>2022-04-02 19:26:46 +0200
committerFabian Jahr <fjahr@protonmail.com>2022-04-02 19:26:46 +0200
commite40779a4fee03c6c455149bd8e9d1a7ccd991450 (patch)
treeb7c591d1e7fe1158e0a8164ad56573c4b5b80c30 /src/httpserver.cpp
parent0598f36852199d0cee8fe9e676a2e0bec3ebf624 (diff)
downloadbitcoin-e40779a4fee03c6c455149bd8e9d1a7ccd991450.tar.xz
refactor: Remove outdated libevent logging code
The removed code was intended to catch issues with event_enable_debug_logging which was not available prior to libevent 2.1.1. This is not necessary since the minimum libevent version was bumped to 2.1.8.
Diffstat (limited to 'src/httpserver.cpp')
-rw-r--r--src/httpserver.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/httpserver.cpp b/src/httpserver.cpp
index f1116e35be..d2b2ea11b8 100644
--- a/src/httpserver.cpp
+++ b/src/httpserver.cpp
@@ -358,12 +358,8 @@ bool InitHTTPServer()
// Redirect libevent's logging to our own log
event_set_log_callback(&libevent_log_cb);
- // Update libevent's log handling. Returns false if our version of
- // libevent doesn't support debug logging, in which case we should
- // clear the BCLog::LIBEVENT flag.
- if (!UpdateHTTPServerLogging(LogInstance().WillLogCategory(BCLog::LIBEVENT))) {
- LogInstance().DisableCategory(BCLog::LIBEVENT);
- }
+ // Update libevent's log handling.
+ UpdateHTTPServerLogging(LogInstance().WillLogCategory(BCLog::LIBEVENT));
#ifdef WIN32
evthread_use_windows_threads();
@@ -402,13 +398,12 @@ bool InitHTTPServer()
return true;
}
-bool UpdateHTTPServerLogging(bool enable) {
+void UpdateHTTPServerLogging(bool enable) {
if (enable) {
event_enable_debug_logging(EVENT_DBG_ALL);
} else {
event_enable_debug_logging(EVENT_DBG_NONE);
}
- return true;
}
static std::thread g_thread_http;