# How to log FText?

**URL:** <https://forums.unrealengine.com/t/how-to-log-ftext/365288>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [July 27, 2016, 2:44am UTC](https://forums.unrealengine.com/t/how-to-log-ftext/365288 "2016-07-27T02:44:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_d4efcd70](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d4efcd70](https://forums.unrealengine.com/u/anonymous_user_d4efcd70)\
**Post date:** [July 27, 2016, 2:44am UTC](https://forums.unrealengine.com/t/how-to-log-ftext/365288/1 "2016-07-27T02:44:36Z")

</div>

I’m having some issues with FText not displaying on my HUD. So, I’m trying to print the contents with `UE_LOG`. The only thing is nothing prints out. I don’t believe I’m converting my FText to FString or FName correctly.

Here’s what I have currently:

```
DialogueNodes *temp = dialogues2.Find(id2);
const FString logData = temp->DialogueFragment.ToString();
FName logDataF = FName(*logData);
UE_LOG(LogTemp, Warning, TEXT("DialogueFragment: %s"), *logDataF.ToString());

```

---

<div class="post-metadata">

**Author:** ![Atheist91](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Atheist91](https://forums.unrealengine.com/u/Atheist91)\
**Post date:** [July 27, 2016, 7:42am UTC](https://forums.unrealengine.com/t/how-to-log-ftext/365288/2 "2016-07-27T07:42:57Z")

</div>

You don’t need to convert FString to FName to print it with UE\_LOG.

Conversion from FText to FString is simple as that:

```
FText SomeText = FText::FromString("Something");
FString SomeString = SomeText.ToString();
UE_LOG(LogTemp, Log, TEXT("SomeString: %s"), *SomeString);

```

There’s no magic here afaik. I’d rather guess that the issue is either with the way you fill your FText variable or with the way you’re trying to display it.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d4efcd70](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d4efcd70](https://forums.unrealengine.com/u/anonymous_user_d4efcd70)\
**Post date:** [July 27, 2016, 9:14am UTC](https://forums.unrealengine.com/t/how-to-log-ftext/365288/3 "2016-07-27T09:14:24Z")

</div>

Odd, I changed a blueprintable function from return type FName to FText, and it wasn’t getting called. Turns out I had to delete the binding to my HUD in blueprints, and recreate it with all of the same functions.

---

<div class="post-metadata">

**Author:** ![Atheist91](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Atheist91](https://forums.unrealengine.com/u/Atheist91)\
**Post date:** [July 27, 2016, 12:00pm UTC](https://forums.unrealengine.com/t/how-to-log-ftext/365288/4 "2016-07-27T12:00:23Z")

</div>

Good that it works. 😛

---

<div class="post-metadata">

**Author:** ![darkgaze](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@darkgaze](https://forums.unrealengine.com/u/darkgaze)\
**Post date:** [January 30, 2018, 11:26am UTC](https://forums.unrealengine.com/t/how-to-log-ftext/365288/5 "2018-01-30T11:26:36Z")

</div>

I think everybody uses this great article on logging

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...
