Four use cases of Log messages

// Called when the game starts
void UWorldPosition::BeginPlay()
{
	Super::BeginPlay();

	// ...
	int intVar = 5;
	float floatVar = 3.7f;
	FString fstringVar = "an fstring variable";
	UE_LOG(LogTemp, Warning, TEXT("Text, %d %f %s"), intVar, floatVar, *fstringVar);
	UE_LOG(LogTemp, Warning, TEXT("Text, %d %f %s"), intVar, floatVar, *fstringVar);
	UE_LOG(LogTemp, Warning, TEXT("Text, %d %f %s"), intVar, floatVar, *fstringVar);
	UE_LOG(LogTemp, Log, TEXT("This is grey text!"));
	UE_LOG(LogTemp, Error, TEXT("This is red text!"));
	UE_LOG(LogTemp, Fatal, TEXT("This fringe case was reached! Debug this!"));
}

Privacy & Terms