# UE\_LOG not accepting fstring as a parameter?

**URL:** <https://forums.unrealengine.com/t/ue-log-not-accepting-fstring-as-a-parameter/327464>\
**Category:** C++\
**Tags:** output-log, unreal-engine, UE4, CPP, question\
**Created:** [August 3, 2015, 7:02am UTC](https://forums.unrealengine.com/t/ue-log-not-accepting-fstring-as-a-parameter/327464 "2015-08-03T07:02:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_53c97efc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_53c97efc](https://forums.unrealengine.com/u/anonymous_user_53c97efc)\
**Post date:** [August 3, 2015, 7:02am UTC](https://forums.unrealengine.com/t/ue-log-not-accepting-fstring-as-a-parameter/327464/1 "2015-08-03T07:02:47Z")

</div>

For some reason after I added UE\_LOG I received a compiler error. It ran fine before I added the third line.  
Here is the code:

```
    const FString ReceivedUE4String = BinaryConversion(ReceivedData);

     data = stringData(ReceivedUE4String);

     UE_LOG(LogTemp, Warning, TEXT("This is the data: %s"), ReceivedData);

```

I’ve added the output log as well:

> <https://gist.github.com/arushirai1/f5790656a31e70c219e1>

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8e2766aa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8e2766aa](https://forums.unrealengine.com/u/anonymous_user_8e2766aa)\
**Post date:** [August 3, 2015, 7:59am UTC](https://forums.unrealengine.com/t/ue-log-not-accepting-fstring-as-a-parameter/327464/2 "2015-08-03T07:59:41Z")

</div>

Hello, aegle

I am sorry to hear about your problem.  
Please, however, note, that `%s` strings are wanted as `TCHAR*` by Log, so you should use `*FString()`.

Hope this helped!

Have a great day!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_71c55af3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_71c55af3](https://forums.unrealengine.com/u/anonymous_user_71c55af3)\
**Post date:** [August 3, 2015, 8:47am UTC](https://forums.unrealengine.com/t/ue-log-not-accepting-fstring-as-a-parameter/327464/3 "2015-08-03T08:47:02Z")

</div>

You may want to look at this.

> **[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...

---

<div class="post-metadata">

**Author:** ![micwanyoike](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@micwanyoike](https://forums.unrealengine.com/u/micwanyoike)\
**Post date:** [July 5, 2019, 11:17am UTC](https://forums.unrealengine.com/t/ue-log-not-accepting-fstring-as-a-parameter/327464/4 "2019-07-05T11:17:15Z")

</div>

Here is an example code of how to fix it:

```
 UE_LOG(LogTemp, Warning, TEXT("This is the data: %s"), *FString(ReceivedData));
```
