diff --git a/src/AudacityApp.cpp b/src/AudacityApp.cpp index 044a04578..3caaec279 100644 --- a/src/AudacityApp.cpp +++ b/src/AudacityApp.cpp @@ -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::SetActiveTarget(NULL) }; // DELETE