log: Construct global logger on first use

This commit is contained in:
MarcoFalke 2019-01-25 15:54:49 -05:00
parent d14ef5721f
commit 77777c5624
No known key found for this signature in database
GPG key ID: CE2B75697E69A548
6 changed files with 34 additions and 28 deletions

View file

@ -364,8 +364,8 @@ bool InitHTTPServer()
// 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(g_logger->WillLogCategory(BCLog::LIBEVENT))) {
g_logger->DisableCategory(BCLog::LIBEVENT);
if (!UpdateHTTPServerLogging(LogInstance().WillLogCategory(BCLog::LIBEVENT))) {
LogInstance().DisableCategory(BCLog::LIBEVENT);
}
#ifdef WIN32