i’d like to display output log in game, and i read the log file(/Saved/[ProjectName].log) by finding its path
like this:
/// get log fie path
FOutputDevice* OutputDevice = FGenericPlatformOutputDevices::GetLog();
if (OutputDevice != nullptr)
{
OutputDeviceFile = static_cast<FOutputDeviceFile*>(OutputDevice);
LogFile = OutputDeviceFile->GetFilename();
}
OutputDeviceFile->Flush();
if (FFileHelper::LoadFileToString(LogContent, *LogFile, FFileHelper::EHashOptions::None, 4))
{
.....
}
it succeeded but really low performace if i execute it on Tick Event.
i guess it’s due to reading file.
is there any way i can get log information before it has been written to [ProjectName].log
thanks a lot for your help!!!