util: Move debug file management functions into Logger.

This commit is contained in:
Jim Posen
2018-04-11 11:12:51 -07:00
parent f55f4fcf05
commit 6a6d764ca5
3 changed files with 23 additions and 57 deletions

View File

@@ -1235,10 +1235,11 @@ bool AppInitMain()
if (gArgs.GetBoolArg("-shrinkdebugfile", logCategories == BCLog::NONE)) {
// 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
ShrinkDebugFile();
g_logger->ShrinkDebugFile();
}
if (!OpenDebugLog()) {
return InitError(strprintf("Could not open debug log file %s", GetDebugLogPath().string()));
if (!g_logger->OpenDebugLog()) {
return InitError(strprintf("Could not open debug log file %s",
g_logger->GetDebugLogPath().string()));
}
}