# How To Simply Print a log

**URL:** <https://forums.unrealengine.com/t/how-to-simply-print-a-log/428859>\
**Category:** C++\
**Tags:** logging, unreal-engine, UE4, CPP, question\
**Created:** [July 7, 2018, 2:54am UTC](https://forums.unrealengine.com/t/how-to-simply-print-a-log/428859 "2018-07-07T02:54:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jack\_Myth](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jack\_Myth](https://forums.unrealengine.com/u/Jack_Myth)\
**Post date:** [July 7, 2018, 2:54am UTC](https://forums.unrealengine.com/t/how-to-simply-print-a-log/428859/1 "2018-07-07T02:54:34Z")

</div>

I want to print some log during runtime.  
I have searched for some documentation. It says I must declare the log class first. sometimes I only want to print a very simple string and don’t want to do any extra works.  
GEngine-\>AddOnScreenDebugMessage() Seems to be a good way, But sometimes I don’t want it to be shown on screen(only show in the output console).  
Just like qDebug() in Qt and OutputDebugString() in VisualStudio, I can use Just a simple code to print some log.  
Can anyone help me?

---

<div class="post-metadata">

**Author:** ![IndieGameCove](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IndieGameCove](https://forums.unrealengine.com/u/IndieGameCove)\
**Post date:** [July 7, 2018, 7:13am UTC](https://forums.unrealengine.com/t/how-to-simply-print-a-log/428859/2 "2018-07-07T07:13:42Z")

</div>

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

UE\_LOG(LogTemp, Warning, TEXT(“Your message”));

---

<div class="post-metadata">

**Author:** ![Jack\_Myth](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jack\_Myth](https://forums.unrealengine.com/u/Jack_Myth)\
**Post date:** [July 7, 2018, 7:20am UTC](https://forums.unrealengine.com/t/how-to-simply-print-a-log/428859/3 "2018-07-07T07:20:13Z")

</div>

Thanks,It seems useful.

---

<div class="post-metadata">

**Author:** ![KaidoomDev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kaidoomdev/32/977996_2.png) [@KaidoomDev](https://forums.unrealengine.com/u/KaidoomDev)\
**Post date:** [July 7, 2018, 9:50am UTC](https://forums.unrealengine.com/t/how-to-simply-print-a-log/428859/4 "2018-07-07T09:50:23Z")

</div>

Tip: You can filter by warning to show only warning logs, and you’ll get a clean log.

---

<div class="post-metadata">

**Author:** ![BojanglesTheLess](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BojanglesTheLess](https://forums.unrealengine.com/u/BojanglesTheLess)\
**Post date:** [December 9, 2022, 3:41pm UTC](https://forums.unrealengine.com/t/how-to-simply-print-a-log/428859/5 "2022-12-09T15:41:35Z")

</div>

for people in the future, the quotation marks in the solution are apparently automatically turned into weird quotation marks by the forum itself. It causes errors. This is correct:

```auto
UE_LOG(LogTemp, Warning, TEXT("Your message"));

```
