How to pass variable LogCategory to UE_LOG?

You need to declare log category first, you can read about it here:

If you want to do easy quick debug you can also use GLog->Log(FString) which is easiest way to log but bypass advance log features.