Open 3D Engine AzToolsFramework 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.
AzToolsFramework::Logging::LogLine Class Reference

#include <LogLine.h>

Public Types

enum  LogType {
  TYPE_DEBUG , TYPE_MESSAGE , TYPE_WARNING , TYPE_ERROR ,
  TYPE_CONTEXT
}
 

Public Member Functions

 AZ_CLASS_ALLOCATOR (LogLine, AZ::SystemAllocator)
 
 LogLine (const char *inMessage, const char *inWindow, LogType inType, AZ::u64 inTime, void *data=nullptr, uintptr_t threadId=0)
 
 LogLine (const LogLine &other)
 
LogLineoperator= (const LogLine &other)
 
 LogLine (LogLine &&other)
 
LogLineoperator= (LogLine &&other)
 
const AZStd::string & GetLogMessage () const
 
const AZStd::string & GetLogWindow () const
 
LogType GetLogType () const
 
AZ::u64 GetLogTime () const
 
uintptr_t GetLogThreadId () const
 
void * GetUserData () const
 
void SetUserData (void *data)
 
AZStd::string ToString ()
 
QVariant data (int column, int role) const
 

Static Public Member Functions

static bool ParseLog (const char *entireLog, AZ::u64 logLength, AZStd::function< void(LogLine &)> logLineAdder)
 
static bool ParseLog (AZStd::list< LogLine > &logList, const char *entireLog, AZ::u64 logLength)
 
static bool ParseLine (LogLine &outLine, const AZStd::string &line)
 
static bool ParseContextLogLine (const LogLine &line, std::pair< QString, QString > &result)
 

Detailed Description

LogLine is a structured version of raw text logged with our various logging mechanisms. It is meant to be just a blind data holder, so you can change its fields directly before submitting it to a model, or just create it via the constructor. Its only not a struct because it has some functions on it to help.

Member Function Documentation

◆ ParseLog()

static bool AzToolsFramework::Logging::LogLine::ParseLog ( const char *  entireLog,
AZ::u64  logLength,
AZStd::function< void(LogLine &)>  logLineAdder 
)
static

Log parsing note For speed's sake, the panels prefer to not allocate any dynamic memory where possible. To enable that to work as quickly and as efficiently as possible, one version of ParseLog allows you to provide a callback for every successfully parsed log line. Because we are parsing out LogLine& and not dynamically allocating storage for these, the other parse function will take in a linked list of LogLines to avoid unnecessary class moves or copies.


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