// Copyright Epic Games, Inc. All Rights Reserved. /*============================================================================= DeferredMessgaeLog.h: Unreal async loading log. =============================================================================*/ #pragma once #include "CoreMinimal.h" class Error; class FTokenizedMessage; /** * Thread safe proxy for the FMessageLog while performing async loading. * Makes sure the messages does not get added to the log until async loading is * finished to prevent modules from being loaded outside of game thread. * Also makes sure the messages are added to the message queue in a thread-safe way. */ class COREUOBJECT_API FDeferredMessageLog { FName LogCategory; static TMap>*> Messages; static FCriticalSection MessagesCritical; void AddMessage(TSharedRef& Message); public: FDeferredMessageLog(const FName& InLogCategory); TSharedRef Info(const FText& Message); TSharedRef Warning(const FText& Message); TSharedRef Error(const FText& Message); static void Flush(); static void Cleanup(); };