Save the log file during exit
This will save the current log to the Audacity config directory and a name of "lastlog.txt". This is for diagnosing errors that may occur during Audacity exit.
This commit is contained in:
parent
cca372fb92
commit
19df017d1f
|
@ -432,6 +432,14 @@ static void QuitAudacity(bool bForce)
|
|||
//temporarily commented out till it is added to all projects
|
||||
//DELETE Profiler::Instance();
|
||||
|
||||
// Save last log for diagnosis
|
||||
auto logger = AudacityLogger::Get();
|
||||
if (logger)
|
||||
{
|
||||
wxFileName logFile(FileNames::DataDir(), wxT("lastlog.txt"));
|
||||
logger->SaveLog(logFile.GetFullPath());
|
||||
}
|
||||
|
||||
//remove our logger
|
||||
std::unique_ptr<wxLog>{ wxLog::SetActiveTarget(NULL) }; // DELETE
|
||||
|
||||
|
|
Loading…
Reference in New Issue