Logging output , "Reason: cannot convert from 'ELogVerbosity::Type' to 'const FName'"

Hi People,

New to the forum, have a feeling i will be asking lots of questions over the next few months, but here’s my first one, i read a post about logging content to the output window (A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums), however using the following code:

float test = 10.0f;//InputComponent->GetAxisValue("MoveRight");
UE_LOG(YourLog, Warning, TEXT("MyCharacter's Health is %f"), test);

following the commands from here i get the following error:

Reason: cannot convert from 'ELogVerbosity::Type' to 'const FName'

Am i doing something wrong?

Hmm by look of it it and seem it is only possibility, you trying to use undeclared log category “YourLog” which seem you just copy pasted. Read “Setting Up Your Own Log Category” section of that wiki page.

Also you dont need to declere category, you can just use LogTemp category which is dedicated for tempery log, there also use GLog->Log() which works with normal FString, but you should use it just for tempery use as it skips log taging process. But if you really looking in to implementing logging in to your code you should definitely declare your own log category and use UE_LOG

Also you can monitor properties states using displayall and getall console commands as well as look on the in property editor by selecting actor in world outliner, if you seek that.

Thanks , i did indeed make the schoolboy error of copying and pasting, using the TempLog to replace YourLog worked. I’ll have a look at the suggested reading material. thanks.