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

#include <MessageLog.h>

Public Member Functions

CORE_API FMessageLog (const FName &InLogName)
 
CORE_API ~FMessageLog ()
 
CORE_API void Flush ()
 
CORE_API const TSharedRef< FTokenizedMessage > & AddMessage (const TSharedRef< FTokenizedMessage > &InMessage)
 
CORE_API void AddMessages (const TArray< TSharedRef< FTokenizedMessage > > &InMessages)
 
CORE_API TSharedRef< FTokenizedMessageMessage (EMessageSeverity::Type InSeverity, const FText &InMessage=FText())
 
CORE_API TSharedRef< FTokenizedMessageCriticalError (const FText &InMessage=FText())
 
CORE_API TSharedRef< FTokenizedMessageError (const FText &InMessage=FText())
 
CORE_API TSharedRef< FTokenizedMessagePerformanceWarning (const FText &InMessage=FText())
 
CORE_API TSharedRef< FTokenizedMessageWarning (const FText &InMessage=FText())
 
CORE_API TSharedRef< FTokenizedMessageInfo (const FText &InMessage=FText())
 
CORE_API int32 NumMessages (EMessageSeverity::Type InSeverityFilter=EMessageSeverity::Info)
 
CORE_API void Open (EMessageSeverity::Type InSeverityFilter=EMessageSeverity::Info, bool bOpenEvenIfEmpty=false)
 
CORE_API void Notify (const FText &InMessage=FText(), EMessageSeverity::Type InSeverityFilter=EMessageSeverity::Info, bool bForce=false)
 
CORE_API void NewPage (const FText &InLabel)
 
CORE_API void SetCurrentPage (const FText &InLabel)
 
CORE_API FMessageLogSuppressLoggingToOutputLog (bool bShouldSuppress=true)
 
 DECLARE_DELEGATE_RetVal_OneParam (TSharedRef< class IMessageLog >, FGetLog, const FName &)
 
 DECLARE_DELEGATE_OneParam (FMessageSelectionChanged, TArray< TSharedRef< FTokenizedMessage > > &)
 
 DECLARE_DELEGATE (FMultiSelectActorBegin)
 
 DECLARE_DELEGATE (FMultiSelectActorEnd)
 

Static Public Member Functions

static FGetLogOnGetLog ()
 
static FMessageSelectionChangedOnMessageSelectionChanged ()
 
static CORE_API ELogVerbosity::Type GetLogVerbosity (EMessageSeverity::Type InSeverity)
 
static CORE_API const TCHAR *const GetLogColor (EMessageSeverity::Type InSeverity)
 
static FMultiSelectActorBeginOnMultiSelectActorBegin ()
 
static FMultiSelectActorEndOnMultiSelectActorEnd ()
 

Constructor & Destructor Documentation

◆ FMessageLog()

FMessageLog::FMessageLog ( const FName InLogName)

Constructor

Parameters
InLogNamethe name of the log to use

◆ ~FMessageLog()

FMessageLog::~FMessageLog ( )

Destructor When this object goes out of scope, its buffered messages will be flushed.

Member Function Documentation

◆ AddMessage()

const TSharedRef< FTokenizedMessage > & FMessageLog::AddMessage ( const TSharedRef< FTokenizedMessage > &  InMessage)

Add a message to the log.

Parameters
InMessageThe message to add
Returns
The message for chaining calls

◆ AddMessages()

void FMessageLog::AddMessages ( const TArray< TSharedRef< FTokenizedMessage > > &  InMessages)

Add an array of messages to the message log

Parameters
InMessagesThe messages to add

◆ CriticalError()

TSharedRef< FTokenizedMessage > FMessageLog::CriticalError ( const FText InMessage = FText())

◆ DECLARE_DELEGATE() [1/2]

FMessageLog::DECLARE_DELEGATE ( FMultiSelectActorBegin  )

Delegates for multi-select of message token actors

◆ DECLARE_DELEGATE() [2/2]

FMessageLog::DECLARE_DELEGATE ( FMultiSelectActorEnd  )

◆ DECLARE_DELEGATE_OneParam()

FMessageLog::DECLARE_DELEGATE_OneParam ( FMessageSelectionChanged  ,
TArray< TSharedRef< FTokenizedMessage > > &   
)

Delegate used when message selection changes. This is used to select object in the scene according to objects referenced in message tokens.

◆ DECLARE_DELEGATE_RetVal_OneParam()

FMessageLog::DECLARE_DELEGATE_RetVal_OneParam ( TSharedRef< class IMessageLog ,
FGetLog  ,
const FName  
)

Delegate to retrieve a log interface. This allows systems that implement IMessageLog to receive messages.

◆ Error()

TSharedRef< FTokenizedMessage > FMessageLog::Error ( const FText InMessage = FText())

◆ Flush()

void FMessageLog::Flush ( )

Send the currently buffered messages to the log & clear the buffer

◆ GetLogColor()

const TCHAR *const FMessageLog::GetLogColor ( EMessageSeverity::Type  InSeverity)
static

Helper function to retrieve a log color for a specified message severity

◆ GetLogVerbosity()

ELogVerbosity::Type FMessageLog::GetLogVerbosity ( EMessageSeverity::Type  InSeverity)
static

Helper function to convert message log severity to log verbosity

◆ Info()

TSharedRef< FTokenizedMessage > FMessageLog::Info ( const FText InMessage = FText())

◆ Message()

TSharedRef< FTokenizedMessage > FMessageLog::Message ( EMessageSeverity::Type  InSeverity,
const FText InMessage = FText() 
)

Helper functions to allow easy adding of messages to the log. Each one will add a token for the severity (if valid) and the textual message (if any). Messages are buffered.

Parameters
InSeverityThe severity of the message
InMessageThe message to use
Returns
the message for chaining calls.

◆ NewPage()

void FMessageLog::NewPage ( const FText InLabel)

Add a new page to the log. Pages will not be created until messages are added to them, so we dont generate lots of empty pages. This call will cause a flush so that the logs state is properly reflected.

Parameters
InLabelThe label for the page.

◆ Notify()

void FMessageLog::Notify ( const FText InMessage = FText(),
EMessageSeverity::Type  InSeverityFilter = EMessageSeverity::Info,
bool  bForce = false 
)

Notify the user with a message if there are messages present. This call will cause a flush so that the logs state is properly reflected.

Parameters
InMessageThe notification message.
InSeverityFilterOnly messages of higher severity than this filter will be considered when checking.
bForceNotify anyway, even if the filters gives us no messages.

◆ NumMessages()

int32 FMessageLog::NumMessages ( EMessageSeverity::Type  InSeverityFilter = EMessageSeverity::Info)

Check whether there are any messages present for this log. If the log is paged, this will check if there are any messages on the current page. This call will cause a flush so that the logs state is properly reflected.

Parameters
InSeverityFilterOnly messages of higher severity than this filter will be considered when checking.
Returns
The number of messages that pass our filter

◆ OnGetLog()

static FGetLog & FMessageLog::OnGetLog ( )
inlinestatic

◆ OnMessageSelectionChanged()

static FMessageSelectionChanged & FMessageLog::OnMessageSelectionChanged ( )
inlinestatic

◆ OnMultiSelectActorBegin()

static FMultiSelectActorBegin & FMessageLog::OnMultiSelectActorBegin ( )
inlinestatic

◆ OnMultiSelectActorEnd()

static FMultiSelectActorEnd & FMessageLog::OnMultiSelectActorEnd ( )
inlinestatic

◆ Open()

void FMessageLog::Open ( EMessageSeverity::Type  InSeverityFilter = EMessageSeverity::Info,
bool  bOpenEvenIfEmpty = false 
)

Opens the log for display to the user given certain conditions. This call will cause a flush so that the logs state is properly reflected.

Parameters
InSeverityFilterOnly messages of higher severity than this filter will be considered when checking.
bOpenEvenIfEmptyOverride the filter & log status & force the log to open.

◆ PerformanceWarning()

TSharedRef< FTokenizedMessage > FMessageLog::PerformanceWarning ( const FText InMessage = FText())

◆ SetCurrentPage()

void FMessageLog::SetCurrentPage ( const FText InLabel)

Sets the current page to the one specified by the label. This call will cause a flush so that the logs state is properly reflected.

Parameters
InLabelThe label for the page.

◆ SuppressLoggingToOutputLog()

FMessageLog & FMessageLog::SuppressLoggingToOutputLog ( bool  bShouldSuppress = true)

Should we mirror message log messages from this instance to the output log during flush?

◆ Warning()

TSharedRef< FTokenizedMessage > FMessageLog::Warning ( const FText InMessage = FText())

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