# UE\_LOG only once?

**URL:** <https://forums.unrealengine.com/t/ue-log-only-once/873701>\
**Category:** C++\
**Tags:** logging, unreal-engine, question\
**Created:** [April 7, 2023, 4:31pm UTC](https://forums.unrealengine.com/t/ue-log-only-once/873701 "2023-04-07T16:31:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lucas\_Stern](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lucas\_Stern](https://forums.unrealengine.com/u/Lucas_Stern)\
**Post date:** [April 7, 2023, 4:31pm UTC](https://forums.unrealengine.com/t/ue-log-only-once/873701/1 "2023-04-07T16:31:27Z")

</div>

When using UE\_LOG to log an information on output log, there is a way to write the log only once, even if the UE\_LOG is inside a TICK() function, without having do any kind of execution flow control with a if statement?

---

<div class="post-metadata">

**Author:** ![xenofsnstudios](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/xenofsnstudios/32/1194578_2.png) [@xenofsnstudios](https://forums.unrealengine.com/u/xenofsnstudios)\
**Post date:** [April 7, 2023, 4:44pm UTC](https://forums.unrealengine.com/t/ue-log-only-once/873701/2 "2023-04-07T16:44:00Z")

</div>

I stumbled upon `UE_CLOG(Condition, CategoryName, Verbosity, Format, ...)` which might fit the bill. It’s conditional logging though, so you are still going to need a check of some sort.

What I do for loops when debugging is this:

`GEngine->AddOnScreenDebugMessage(1, 1.0f, FColor::Green, FString::Printf(TEXT("Triggered")));`

I’m not sure if you already knew, but the first parameter, if a positive number, sets the row for this message to appear in, so it will overwrite the message of the previous frame and not fill up the screen with log messages.

---

<div class="post-metadata">

**Author:** ![monstercoo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@monstercoo](https://forums.unrealengine.com/u/monstercoo)\
**Post date:** [March 19, 2024, 7:46am UTC](https://forums.unrealengine.com/t/ue-log-only-once/873701/3 "2024-03-19T07:46:02Z")

</div>

UE\_LOG\_ONLINE\_ONCE does what you want.

---

<div class="post-metadata">

**Author:** ![Sinbad3D](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sinbad3D](https://forums.unrealengine.com/u/Sinbad3D)\
**Post date:** [April 14, 2026, 5:20pm UTC](https://forums.unrealengine.com/t/ue-log-only-once/873701/4 "2026-04-14T17:20:10Z")

</div>

FYI I created a couple of macros in my helpers lib to do this: [StevesUEHelpers/Source/StevesUEHelpers/Public/StevesLogHelpers.h at master · sinbad/StevesUEHelpers · GitHub](https://github.com/sinbad/StevesUEHelpers/blob/master/Source/StevesUEHelpers/Public/StevesLogHelpers.h)

`STEVES_LOG_ONCE`logs once ever per session, much like the previously suggested `UE_LOG_ONLINE_ONCE`except that it lets you use your own category.

`STEVES_LOG_NOREPEAT`is a bit smarter in that you can give it a type/value and it will only log if the value you pass it is different to the last time it was logged. This is more useful because it’ll expose multiple cases of a warning/error so long as it’s not warning about the same thing (sequentially). Very useful for code you call a lot in sequence and only want to be warned once until the value in question changes.
