Copy #include "Logging/StructuredLog.h"
DEFINE_LOG_CATEGORY_STATIC(LogSlasherGame, All, All);
const FString Name = "Patrick Bateman";
const bool IsDead = false;
const int32 Ammo = 10;
UE_LOGFMT(LogSlasherGame, Display, "Name: {0}, is alive: {1}, ammo: {2}", Name, !IsDead, Ammo);
Copy #include "Logging/StructuredLog.h"
DEFINE_LOG_CATEGORY_STATIC(LogSlasherGame, All, All);
const FString Name = "Patrick Bateman";
const bool IsDead = false;
const int32 Ammo = 10;
UE_LOGFMT(LogSlasherGame, Display, "Name: {0}, is alive: {1}, ammo: {2}", Name, !IsDead, Ammo);
UE_LOG(LogSlasherGame, Display, TEXT("Name: %s, is alive: %s, ammo: %d"), *Name, IsDead ? TEXT("false") : TEXT("true"), Ammo);
Copy #include "Logging/StructuredLog.h"
DEFINE_LOG_CATEGORY_STATIC(LogSlasherGame, All, All);
const FString Name = "Patrick Bateman";
const bool IsDead = false;
const int32 Ammo = 10;
UE_LOGFMT(LogSlasherGame, Display, "Name: {name}, is alive: {alive}, ammo: {ammo}", Name, !IsDead, Ammo);
Copy Name: Patrick Bateman, is alive: true, ammo: 10
Copy #include "Logging/StructuredLog.h"