DEBUG("Debug message here: %s %i etc", *myfstring, 3)
to expand to:
UE_LOG(LogTemp, Warning, "[MyClassName] Debug message here: %s %i etc", *myfstring, 3);
So I’m essentially trying to inject a prefix of [MyClassName] before the string. I’ve tried so many different combinations of things, but it’s just quoting the wrong things instead of evaluating. I really don’t want to do this, but I even tried putting a %s before the string to try to inject the prefix that way with the way UE_LOG works, but I couldn’t figure that out either.
One of the many things I’ve tried:
#define DEBUG_NAME MyClassName #define DEBUG(x, y) x, TEXT(""##DEBUG_NAME##"]"), y)
DEBUG("%sDebug message here: %s %i etc", *myfstring, 3) // %s at start is ugly; should be handled behind the scenes