|
|
@ -344,10 +344,22 @@ static void HTTPWorkQueueRun(WorkQueue<HTTPClosure>* queue, int worker_num)
|
|
|
|
/** libevent event log callback */
|
|
|
|
/** libevent event log callback */
|
|
|
|
static void libevent_log_cb(int severity, const char *msg)
|
|
|
|
static void libevent_log_cb(int severity, const char *msg)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (severity >= EVENT_LOG_WARN) // Log warn messages and higher without debug category
|
|
|
|
BCLog::Level level;
|
|
|
|
LogPrintf("libevent: %s\n", msg);
|
|
|
|
switch (severity) {
|
|
|
|
else
|
|
|
|
case EVENT_LOG_DEBUG:
|
|
|
|
LogPrint(BCLog::LIBEVENT, "libevent: %s\n", msg);
|
|
|
|
level = BCLog::Level::Debug;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case EVENT_LOG_MSG:
|
|
|
|
|
|
|
|
level = BCLog::Level::Info;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case EVENT_LOG_WARN:
|
|
|
|
|
|
|
|
level = BCLog::Level::Warning;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
default: // EVENT_LOG_ERR and others are mapped to error
|
|
|
|
|
|
|
|
level = BCLog::Level::Error;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
LogPrintLevel(level, BCLog::LIBEVENT, "%s\n", msg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool InitHTTPServer()
|
|
|
|
bool InitHTTPServer()
|
|
|
|