From 3316a9ebb66171937efddb213daed64fe51c4082 Mon Sep 17 00:00:00 2001 From: Jim Posen Date: Wed, 11 Apr 2018 13:02:01 -0700 Subject: util: Encapsulate logCategories within BCLog::Logger. --- src/init.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/init.cpp') diff --git a/src/init.cpp b/src/init.cpp index c14597d51..ccaa09a85 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -968,7 +968,7 @@ bool AppInitParameterInteraction() InitWarning(strprintf(_("Unsupported logging category %s=%s."), "-debug", cat)); continue; } - logCategories |= flag; + g_logger->EnableCategory(static_cast(flag)); } } } @@ -980,7 +980,7 @@ bool AppInitParameterInteraction() InitWarning(strprintf(_("Unsupported logging category %s=%s."), "-debugexclude", cat)); continue; } - logCategories &= ~flag; + g_logger->DisableCategory(static_cast(flag)); } // Check for -debugnet @@ -1232,7 +1232,7 @@ bool AppInitMain() CreatePidFile(GetPidFile(), getpid()); #endif if (g_logger->fPrintToDebugLog) { - if (gArgs.GetBoolArg("-shrinkdebugfile", logCategories == BCLog::NONE)) { + if (gArgs.GetBoolArg("-shrinkdebugfile", g_logger->DefaultShrinkDebugFile())) { // Do this first since it both loads a bunch of debug.log into memory, // and because this needs to happen before any other debug.log printing g_logger->ShrinkDebugFile(); -- cgit v1.2.3