OutputDevice->Serialize parameters

I want to print a double to a file using OutputDevice->Serialize. I will spare you the different ways I’ve tried. I know the code below is wrong. I am posting it only to illustrate what I am trying to do…

double dVal = 0;

OutputDevice->Serialize(dVal, ELogVerbosity::Log, FName(TEXT(“StatCategory”)));

OutputDevice->Serialize wants a const TCHAR* as the first argument. I am goofing around with Fstring::Printf and getting errors about cannot convert “whatever” to const TCHAR *.

How can I get a double into a form that will work in this context? (Bonus question - I need to so this for integers as well.)

Note to self… here’s what works for me:

Declare these in the header…

const TCHAR * temp;
FString dVal_FS;

…then in the .cpp…

dVal = <some double value>
dVal_FS = FString::SanitizeFloat(dVal);
temp = *dVal_FS;
OutputDevice->Serialize(temp, ELogVerbosity::Log, FName(TEXT("StatCategory")));