UE_LOG not logging

Hey,

I seem to have stumbled upon an issue I don’t how to “fix”.
When trying to use the macro UE_LOG, it doesn’t do anything. I tried to use Visual Studios debugging tool, but the debugging never “stops” at the breakpoint I make at the macro.

I’ve tried to have both UE_LOGS:
UE_LOG(LogTemp, Warning, TEXT(“TEST”));

UE_LOG(LogTemp, Warning, TEXT("%s is looking at %s"),
	*PlayerViewPointLocation.ToString(),
	*PlayerViewPointRotation.ToString()
);

or just one of each, but none of the options work.

Tried looking around, but haven’t found any answer for myself.

Thanks in advance

If the debugger doesn’t stop at the breakpoint (which I’m assuming is on the same line as your seemingly ineffectual UE_LOG macro call), have you considered the possibility that the control flow is never reaching the UE_LOG line at all?

To investigate that, you could put more breakpoints (or UE_LOG calls) further upstream in your control flow to diagnose where control is indeed flowing to. To make sure UE_LOG is working as expected, you could try putting the macro call somewhere very early on in the control flow (e.g. in the BeginPlay function of Grabber or DoorOpen or another C++ module of your choice).

A smart way to diagnose it, and it totally helped.
I made a macro as early as I could that I knew would work (under BeginPlay), and nothing was called.

Found out that UE4 had switched the Game Mode back to it’s original Game Mode, hence the Pawn in question was never used, which is why nothing was called.

Thanks for the help! :smiley:

You’re welcome! Don’t you love that feeling when it seems like everything is really broken, but it’s actually only a little broken?

I do indeed!
It’s such a relief to know it has such a simple fix :smiley:

Privacy & Terms