|
@@ -50,7 +50,7 @@ namespace AzToolsFramework
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
- void TraceLogger::PrepareLogFile(const AZStd::string& logFileName)
|
|
|
|
|
|
+ void TraceLogger::OpenLogFile(const AZStd::string& logFileName, bool clearLogFile)
|
|
{
|
|
{
|
|
using namespace AzFramework;
|
|
using namespace AzFramework;
|
|
|
|
|
|
@@ -73,7 +73,7 @@ namespace AzToolsFramework
|
|
AZStd::string logPath;
|
|
AZStd::string logPath;
|
|
StringFunc::Path::Join(logDirectory.c_str(), logFileName.c_str(), logPath);
|
|
StringFunc::Path::Join(logDirectory.c_str(), logFileName.c_str(), logPath);
|
|
|
|
|
|
- m_logFile.reset(aznew LogFile(logPath.c_str()));
|
|
|
|
|
|
+ m_logFile.reset(aznew LogFile(logPath.c_str(), clearLogFile));
|
|
if (m_logFile)
|
|
if (m_logFile)
|
|
{
|
|
{
|
|
m_logFile->SetMachineReadable(false);
|
|
m_logFile->SetMachineReadable(false);
|
|
@@ -81,7 +81,7 @@ namespace AzToolsFramework
|
|
{
|
|
{
|
|
m_logFile->AppendLog(LogFile::SEV_NORMAL, message.window.c_str(), message.message.c_str());
|
|
m_logFile->AppendLog(LogFile::SEV_NORMAL, message.window.c_str(), message.message.c_str());
|
|
}
|
|
}
|
|
- m_startupLogSink = {};
|
|
|
|
|
|
+ m_startupLogSink.clear();
|
|
m_logFile->FlushLog();
|
|
m_logFile->FlushLog();
|
|
}
|
|
}
|
|
}
|
|
}
|