Core/Logging API – FMessageLog to write messages to the Message Log

FMessageLog is an object that allows you to write output messages to the Message Log (Window | Developer Tools | Message Log) and Output Log (Window | Developer Tools | Output Log) simultaneously.

Getting ready

Have your project ready and some information to log to Message Log. Display Message Log in your UE4 Editor. The following screenshot is of the Message Log:

Getting ready

How to do it…

  1. Add #define to your main header file (ProjectName.h) defining LOCTEXT_NAMESPACE as something unique to your codebase:
    #define LOCTEXT_NAMESPACE "Chapter12Namespace"

    This #define is used by the LOCTEXT() macro, ...

Get Unreal Engine 4 Scripting with C++ Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.