Buffer log messages and explicitly open logs

Prevents stomping on debug logs in datadirs that are locked by other
instances and lost parameter interaction messages that can get wiped by
ShrinkDebugFile().

The log is now opened explicitly and all emitted messages are buffered
until this open occurs.  The version message and log cut have also been
moved to the earliest possible sensible location.
This commit is contained in:
Adam Weiss
2015-05-15 15:31:14 -04:00
committed by Jack Grigg
parent 2af5a65066
commit 8550bcfeca
3 changed files with 84 additions and 27 deletions

View File

@@ -136,6 +136,7 @@ void ReadConfigFile(std::map<std::string, std::string>& mapSettingsRet, std::map
boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate = true);
#endif
boost::filesystem::path GetTempPath();
void OpenDebugLog();
void ShrinkDebugFile();
void runCommand(const std::string& strCommand);
const boost::filesystem::path GetExportDir();