aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp
index d7d60b0fbc..7c108ac4a6 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1146,8 +1146,11 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
#ifndef WIN32
CreatePidFile(GetPidFile(), getpid());
#endif
- if (GetBoolArg("-shrinkdebugfile", !fDebug))
+ if (GetBoolArg("-shrinkdebugfile", !fDebug)) {
+ // 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();
+ }
if (fPrintToDebugLog)
OpenDebugLog();