No Logging will work! Please help!

I have been trying for 4 hours now (unsuccessfully) to log any kind of data to the screen or the output log using C++. I’m fairly proficient with C++ but I’m new to Unreal Engine. I am using version 1.16 (maybe that’s the problem?)

Has anyone managed to successfully get text to appear in the output log or on the screen of Unreal Editor version 1.16 using C++? It seems like it should not be this mind boggling difficult. I’ve tried both UE_LOG and “GEngine->AddOnScreenDebugMessage” (yes, with appropriate parameters) a million different ways, following over 12 different tutorials and instructional videos. Often it will compile just fine, but there will be no text appearing whether in the log or on the screen. Ever. No matter what I do. I’ve put these functions/macros in the OnFire function of the FPS example project, I’ve put them in the begin play function, in the constructor (for the first person character), I’ve made no actors and tried putting them in their own constructors, begin play, even in the tick function. Absolutely nothing. I also tried it by adding “-Log” to the editor’s target. That also did not work. It made an extra log but nothing showed up on it from my attempted messages.

The copy of Unreal is only a day old, again version is 1.16, my computer is top of the line, and I’m using Microsoft Visual Studio 2015. And I really just print things whether to screen or to the output log. I tried making my own log categories, I tried using LogTemp… Is there some magical switch I need to flip to get it to work in the editor? I have not done much in this project so I doubt I accidentally fubar’d something… I should mention I tried all manner of header files and even making my own macro to print on the screen. Nothing works.

Please let me know if you have logged text to screen or the output log if you have 1.16 and exactly how you did it. Thanks!!!

UE_LOG(LogTemp, Error, TEXT(“Begin Play”));
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT(“This is an on screen message!”));
works in 4.16.2. So try to rebuild?

Are you sure that the code that outputs the log message is actually being executed? Have you tried setting a breakpoint on that code to make sure it is actually being run?

I’m using custom and engine native log functions and on screen messages. 4.16, 4.16.2. Works fine, problem must be in your code or project configuration, maybe try removing Intermediate, Saved, .vs ,Binaries folders. And then use ‘Generate Visual Studio project files’. But preserve Saved/Config, that one is important.

Try adding this to DefaultEngine.ini



[/Script/Engine.Engine]
bEnableOnScreenDebugMessages=true


I tried all of that verbatim. It just throws errors. It’s a fresh DL of UE4 v16 so I’m not sure what’s going on… I switched to my other computer and it worked just fine with no errors.

It’s definitely being run, I checked with breakpoints. Just nothing appears in any logs.

I will try that. Thanks!