Talk:Logs, Printing Messages To Yourself During Runtime
A small caveat: UE_LOG statements be added without a semicolon (";"). That's because the macro expansion will add its own semicolon after the parsing stage. This has the unfortunate side-effect of not being compatible with if / else statements as your own semicolon will cause a "illegal else without matching if" error.
Knightster (talk) 11:45, 17 January 2016 (UTC) :
With Visual Studio 2015, the print of a FName seems to be changed from "*myFName" to "*(myFName.ToString())"
Could someone confirm?
Can anyone confirm this procedure works with 4.12+
I have attempted to follow the instructions on this page multiple times, have never been able to successfuly output any logging info to the UE4 Output Log window.
I added this to my <game>.h
DECLARE_LOG_CATEGORY_EXTERN(YourLog, Log, All);
and this <game>.cpp:
DEFINE_LOG_CATEGORY(YourLog);
Then in a spot where I have working on-screen debugging messages triggered i stuck this:
UE_LOG(YourLog, Warning, TEXT("TESTETESTESTSETE"));
But that output is never seen in Output Log window in UE4 editor. Can anyone confirm this is a bug in 4.12+ ?
Isn't it easier to use GLog for messaging now?