mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
util: Encapsulate logCategories within BCLog::Logger.
This commit is contained in:
parent
6a6d764ca5
commit
3316a9ebb6
7 changed files with 55 additions and 28 deletions
|
|
@ -968,7 +968,7 @@ bool AppInitParameterInteraction()
|
|||
InitWarning(strprintf(_("Unsupported logging category %s=%s."), "-debug", cat));
|
||||
continue;
|
||||
}
|
||||
logCategories |= flag;
|
||||
g_logger->EnableCategory(static_cast<BCLog::LogFlags>(flag));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -980,7 +980,7 @@ bool AppInitParameterInteraction()
|
|||
InitWarning(strprintf(_("Unsupported logging category %s=%s."), "-debugexclude", cat));
|
||||
continue;
|
||||
}
|
||||
logCategories &= ~flag;
|
||||
g_logger->DisableCategory(static_cast<BCLog::LogFlags>(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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue