# Equivalent to BluePrint's PrintString node?

**URL:** <https://forums.unrealengine.com/t/equivalent-to-blueprints-printstring-node/344871>\
**Category:** Blueprint\
**Tags:** unreal-engine, CPP, Blueprint, question\
**Created:** [January 21, 2016, 10:46pm UTC](https://forums.unrealengine.com/t/equivalent-to-blueprints-printstring-node/344871 "2016-01-21T22:46:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MiDri](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MiDri](https://forums.unrealengine.com/u/MiDri)\
**Post date:** [January 21, 2016, 10:46pm UTC](https://forums.unrealengine.com/t/equivalent-to-blueprints-printstring-node/344871/1 "2016-01-21T22:46:18Z")

</div>

So I know you can use `GEngine->AddOnScreenDebugMessage` to display a message on screens in c++, but it does not work exactly the same as BluePrint’s PrintString. PrintString has some extra logic to it that lets it know where the message is coming form (Prefixes message with Server, or client #).

---

<div class="post-metadata">

**Author:** ![Daekesh](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/daekesh/32/918652_2.png) [@Daekesh](https://forums.unrealengine.com/u/Daekesh)\
**Post date:** [January 21, 2016, 11:02pm UTC](https://forums.unrealengine.com/t/equivalent-to-blueprints-printstring-node/344871/2 "2016-01-21T23:02:09Z")

</div>

Right click the print string node. Choose go to code definition. Call that function from c++.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ef23e124](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ef23e124](https://forums.unrealengine.com/u/anonymous_user_ef23e124)\
**Post date:** [January 21, 2016, 11:04pm UTC](https://forums.unrealengine.com/t/equivalent-to-blueprints-printstring-node/344871/3 "2016-01-21T23:04:52Z")

</div>

MiDri,

I believe that you are looking for a macro called UE\_Log. Others I am sure can tell you more about it, than I can, as I tend to only delve into the macros as much as I absolutely have too, preferring to spend time writing my own code, than to mess around with macros.

There is also some information available in the wiki, such as

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

or here in the forums

> **[How do I log a simple string?](https://forums.unrealengine.com/showthread.php?1082-How-do-I-log-a-simple-string)**
>
> I am not sure how to log a simple string. I found the UE\_LOG macro but it is not obvious to me how to use it.

---

<div class="post-metadata">

**Author:** ![MiDri](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MiDri](https://forums.unrealengine.com/u/MiDri)\
**Post date:** [January 22, 2016, 12:24am UTC](https://forums.unrealengine.com/t/equivalent-to-blueprints-printstring-node/344871/4 "2016-01-22T00:24:52Z")

</div>

Thanks! For future reference incase anyone else wants to use it:  
Put the following in your project.h file:

`#include "Kismet/KismetSystemLibrary.h" #define DebugText(text, bPrintToScreen, bPrintToLog, TextColor, Duration) UKismetSystemLibrary::PrintText(GetWorld(), text, bPrintToScreen, bPrintToLog, TextColor, Duration);`

I should note this increases compile time significantly.
