UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::FLogRecord Class Reference

#include <StructuredLog.h>

Public Member Functions

const FNameGetCategory () const
 
void SetCategory (const FName &InCategory)
 
ELogVerbosity::Type GetVerbosity () const
 
void SetVerbosity (ELogVerbosity::Type InVerbosity)
 
const FLogTimeGetTime () const
 
void SetTime (const FLogTime &InTime)
 
const TCHARGetFormat () const
 
void SetFormat (const TCHAR *InFormat)
 
const FLogTemplate * GetTemplate () const
 
void SetTemplate (const FLogTemplate *InTemplate)
 
const FCbObjectGetFields () const
 
void SetFields (FCbObject &&InFields)
 
const ANSICHARGetFile () const
 
void SetFile (const ANSICHAR *InFile)
 
int32 GetLine () const
 
void SetLine (int32 InLine)
 
const TCHARGetTextNamespace () const
 
void SetTextNamespace (const TCHAR *InTextNamespace)
 
const TCHARGetTextKey () const
 
void SetTextKey (const TCHAR *InTextKey)
 
UE_API void FormatMessageTo (FUtf8StringBuilderBase &Out) const
 
UE_API void FormatMessageTo (FWideStringBuilderBase &Out) const
 
UE_API void ConvertToCommonLog (FUtf8StringBuilderBase &OutFormat, FCbWriter &OutFields) const
 

Detailed Description

Record of a log event.

Member Function Documentation

◆ ConvertToCommonLog()

void UE::FLogRecord::ConvertToCommonLog ( FUtf8StringBuilderBase OutFormat,
FCbWriter OutFields 
) const

Converts this record into a common format string and compatible fields.

The common format string uses '{{' as a literal '{' and uses as a literal '}}'. The common format string contains no format specifiers or format argument modifiers. The common format string uses field names matching [A-Za-z0-9_]+.

When a compatible field is an object, it will have a string field named $text containing the formatted value. A compatible field will never be an array.

Parameters
OutFormatAppended with a transformed version of the format from Template.
OutFieldsMust be within an object scope. Appended with a compatible version of Fields.

◆ FormatMessageTo() [1/2]

void UE::FLogRecord::FormatMessageTo ( FUtf8StringBuilderBase Out) const

Formats the message using the format, template, and fields.

◆ FormatMessageTo() [2/2]

void UE::FLogRecord::FormatMessageTo ( FWideStringBuilderBase Out) const

◆ GetCategory()

const FName & UE::FLogRecord::GetCategory ( ) const
inline

The optional name of the category for the log record. None when omitted.

◆ GetFields()

const FCbObject & UE::FLogRecord::GetFields ( ) const
inline

The fields referenced by the format string, along with optional additional fields.

◆ GetFile()

const ANSICHAR * UE::FLogRecord::GetFile ( ) const
inline

The optional source file path for the code that created the log record. Null when omitted.

◆ GetFormat()

const TCHAR * UE::FLogRecord::GetFormat ( ) const
inline

The format string that serves as the message for the log record. Example: TEXT("FieldName is {FieldName}")

◆ GetLine()

int32 UE::FLogRecord::GetLine ( ) const
inline

The optional source line number for the code that created the log record. 0 when omitted.

◆ GetTemplate()

const FLogTemplate * UE::FLogRecord::GetTemplate ( ) const
inline

The optional template for the format string.

◆ GetTextKey()

const TCHAR * UE::FLogRecord::GetTextKey ( ) const
inline

The key of the localized text. Null when non-localized.

◆ GetTextNamespace()

const TCHAR * UE::FLogRecord::GetTextNamespace ( ) const
inline

The namespace of the localized text. Null when non-localized.

◆ GetTime()

const FLogTime & UE::FLogRecord::GetTime ( ) const
inline

The time at which the log record was created.

◆ GetVerbosity()

ELogVerbosity::Type UE::FLogRecord::GetVerbosity ( ) const
inline

The verbosity level of the log record. Must be a valid level with no flags or special values.

◆ SetCategory()

void UE::FLogRecord::SetCategory ( const FName InCategory)
inline

◆ SetFields()

void UE::FLogRecord::SetFields ( FCbObject &&  InFields)
inline

◆ SetFile()

void UE::FLogRecord::SetFile ( const ANSICHAR InFile)
inline

◆ SetFormat()

void UE::FLogRecord::SetFormat ( const TCHAR InFormat)
inline

◆ SetLine()

void UE::FLogRecord::SetLine ( int32  InLine)
inline

◆ SetTemplate()

void UE::FLogRecord::SetTemplate ( const FLogTemplate *  InTemplate)
inline

◆ SetTextKey()

void UE::FLogRecord::SetTextKey ( const TCHAR InTextKey)
inline

◆ SetTextNamespace()

void UE::FLogRecord::SetTextNamespace ( const TCHAR InTextNamespace)
inline

◆ SetTime()

void UE::FLogRecord::SetTime ( const FLogTime InTime)
inline

◆ SetVerbosity()

void UE::FLogRecord::SetVerbosity ( ELogVerbosity::Type  InVerbosity)
inline

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