I often had a necessity to log data from webservice to verify the contents. And thought of implementing a function for that. And the result is here.


void CYourClass::WriteLog(CString sData, CString sFileName)

{
CStdioFile file;

if(file.Open(sFileName, CFile::modeCreate|CFile::modeWrite))

{

file.WriteString(sData);

}

}
Advertisements