GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("This is an on screen message!"));
UE_LOG(LogTemp, Log, TEXT("Log text %f"), 0.1f);
UE_LOG(LogTemp, Warning, TEXT("Log warning"));
UE_LOG(LogTemp, Error, TEXT("Log error"));
FError::Throwf(TEXT("Log error"));
FMessageDialog::Open(EAppMsgType::Ok, FText::FromString(TEXT("Dialog message")));

 

 

PlayerController::ClientMessage usually does this, and you can see how it passes through to ClientTeamMessage, and then (in the context of the local player controller) calls this:
CastChecked<ULocalPlayer>(Player)->ViewportClient->ViewportConsole->OutputText( SMod );

So ya, get a reference to the player controller, and call ClientMessage(TEXT("Console message"));

 

 

for (auto& Elem :FruitMap)
{
    FPlatformMisc::LocalPrint(
        *FString::Printf(
            TEXT("(%d, \"%s\")\n"),
            Elem.Key,
            *Elem.Value
        )
    );
}