Fixing problem with FileIO (exception in Environment.h)

Signed-off-by: Dayo Lawal <lawalfua@amazon.com>
monroegm-disable-blank-issue-2
Dayo Lawal 5 years ago committed by Dayo Lawal
parent df18e53ab4
commit b365f8bddf

@ -16,7 +16,6 @@
#include <AzFramework/StringFunc/StringFunc.h>
#include <AzFramework/Logging/LogFile.h>
namespace AzQtComponents
{
class AzQtTraceLogger::Impl : public AZ::Debug::TraceMessageBus::Handler
@ -78,11 +77,13 @@ namespace AzQtComponents
void AzQtTraceLogger::Impl::WriteStartupLog(char name[])
{
using namespace AzFramework;
std::string temp = name;
//using namespace AzFramework;
///*
AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance();
AZ_Assert(fileIO != nullptr, "FileIO should be running at this point");
/*
// There is no log system online so we have to create your own log file.
char resolveBuffer[AZ_MAX_PATH_LEN] = { 0 };
fileIO->ResolvePath("@user@", resolveBuffer, AZ_MAX_PATH_LEN);
@ -110,5 +111,6 @@ namespace AzQtComponents
m_startupLogSink = {};
m_logFile->FlushLog();
}
*/
}
} // namespace AzQtComponents

@ -352,7 +352,7 @@ namespace MaterialEditor
ExitMainLoop();
}
}
///*
/*
void MaterialEditorApplication::WriteStartupLog()
{
using namespace AzFramework;
@ -388,7 +388,7 @@ namespace MaterialEditor
m_logFile->FlushLog();
}
}
//*/
*/
void MaterialEditorApplication::LoadSettings()
{
AZ::SerializeContext* context = nullptr;
@ -476,8 +476,8 @@ namespace MaterialEditor
return;
}
//m_traceLogger->WriteStartupLog("MaterialEditor.log");
WriteStartupLog();
m_traceLogger->WriteStartupLog("MaterialEditor.log");
//WriteStartupLog();
if (!LaunchDiscoveryService())
{

@ -106,7 +106,7 @@ namespace MaterialEditor
void CompileCriticalAssets();
void ProcessCommandLine(const AZ::CommandLine& commandLine);
void WriteStartupLog();
//void WriteStartupLog();
void LoadSettings();
void UnloadSettings();

Loading…
Cancel
Save