Finally I am answering my own question here.
It doesn't compile because I need to use the TEXT Macro before giving a string into UE_LOG.
FString s = "ss";
UE_LOG(LogTemp, Warning, TEXT("%s"), *s);
//or
UE_LOG(LogTemp, Warning, TEXT("ss"));
//this should work
UE_LOG(LogTemp, Warning, TEXT("%s"), *FPaths::GetPath("../"));
should work with Unreal's version of Datatypes instead of using the std library