How log function execution in .cpp file?

How log function execution in .cpp file? Is here any kind of console and function to send message there or only manual making of txt file and writing there?

You want to have a log?

Check this: A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums

You can change “UE_LOG(YourLog,Warning,TEXT(“This is a message to yourself during runtime!”));” to

UE_LOG(LogTemp,Warning,TEXT(“This is a message to yourself during runtime!”));

to use a premade LogState i guess. You can find the File inside the “Saved/Logs” folder inside your project folder.

Thank you, there are some overloaded types for log like int, float, string and so on, but i can’t use enum class in any case, is here any solution?

Isn’t an enum represented by numbers from 0 to X ? Like an array?

So i guess you could log an int type and use your Enum. Just remember the order of your enum :X

i can’t, when i try it like

UE_LOG(LogTemp, Warning, TEXT("HandleNewState EnableSpawning %d"), NewState)

i get error

Error 2 error C2665: ‘CheckVA’ : none of the 11 overloads could convert all the argument types D:\ue4\engine\Unreal Engine\4.4\Engine\Source\Runtime\Core\Public\Misc\OutputDevice.h 378 1 tut_third_code

So NewState is ETutorialCodePlayState and declared as

enum class ETutorialCodePlayState : short
{
	EPlaying, EGameOver, EUnknown
};

What about?

UE_LOG(LogTemp, Warning, TEXT("HandleNewState EnableSpawning %d"), (short)NewState);

ty, work this way, but why it didn’t without specifing exact type?

enum class ETutorialCodePlayState : short

was obviously short already