Open 3D Engine AzFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzFramework::LogFile Class Reference

#include <LogFile.h>

Public Types

enum  SeverityLevel {
  SEV_DEBUG , SEV_NORMAL , SEV_WARNING , SEV_ERROR ,
  SEV_ASSERT , SEV_EXCEPTION
}
 

Public Member Functions

 LogFile (const char *baseDirectory, const char *fileName, AZ::u64 rollverLength, bool forceOverwriteFile=false)
 initialize it this way in order to place files in that folder with additional files being rolled over into every rolloverLength bytes.
 
 LogFile (const char *absolutePath, bool forceOverwriteFile=false)
 You can also initialize it as an absolute path, in which case it will not perform rollovers or path changes.
 
void AppendLog (SeverityLevel severity, const char *category, const char *datasource)
 
void AppendLog (SeverityLevel severity, const char *dataSource)
 
void AppendLog (SeverityLevel severity, const char *dataSource, int dataLength, const char *category=NULL, int categoryLen=0, uintptr_t threadId=0, AZ::u64 time=0)
 
void FlushLog ()
 Only call FlushLog in cases of emergencies such as access violation termination. Do not call it after appending.
 
void SetMachineReadable (bool newMode)
 

Detailed Description

LogFile This class stores information related to the log file and is responsible for writing logs

Member Function Documentation

◆ SetMachineReadable()

void AzFramework::LogFile::SetMachineReadable ( bool  newMode)

If you flip the log file into Machine Readable = false, it will no longer delimit, and it will format it for human eyes instead This makes it much slower or ambiguous to parse with machines, but may be easier for humans to read. This is set to true by default, because the recommended way to peruse logs is to use a log viewer.


The documentation for this class was generated from the following file: