# How to print strings in c++ console?

**URL:** <https://forums.unrealengine.com/t/how-to-print-strings-in-c-console/48777>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [November 30, 2015, 3:43am UTC](https://forums.unrealengine.com/t/how-to-print-strings-in-c-console/48777 "2015-11-30T03:43:37Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![namrog84](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/namrog84/32/1160009_2.png) [@namrog84](https://forums.unrealengine.com/u/namrog84)\
**Post date:** [November 30, 2015, 4:23am UTC](https://forums.unrealengine.com/t/how-to-print-strings-in-c-console/48777/2 "2015-11-30T04:23:31Z")

</div>

Which console do you mean? If the unreal console(“Output Log”), see below.

> **[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 — ue4community.wiki! You will be able to find content from the official...

new link:

> **[Logs, Printing Messages To Yourself During Runtime | Unreal Engine Community...](https://unrealcommunity.wiki/logs-printing-messages-to-yourself-during-runtime-n5ifosqc)**
>
> @alert info This is a legacy article imported from the old wiki. An updated version can be found here: \[Not Created Yet\] @endalert Overview Logs are essential for giving yourself feedback as to whe...

Console Log:

```auto

UE_LOG(LogTemp, Warning, TEXT("Your message"));
UE_LOG(YourLog, Warning, TEXT("This is a message to yourself during runtime!"));

```

On Screen:

```auto

GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("This is an on screen message!"));
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, FString::Printf(TEXT("Some variable values: x: %f, y: %f"), x, y));

```

---

_[View the full topic](https://forums.unrealengine.com/t/how-to-print-strings-in-c-console/48777)._
