#include "threads/SingleLock.h"
#include "threads/Thread.h"
#include "utils/StdString.h"
+#include "utils/StringUtils.h"
#if defined(TARGET_ANDROID)
#include "android/activity/XBMCApp.h"
#elif defined(TARGET_WINDOWS)
}
else if (m_repeatCount)
{
- CStdString strData2;
- strPrefix.Format(prefixFormat, time.wHour, time.wMinute, time.wSecond, (uint64_t)CThread::GetCurrentThreadId(), levelNames[m_repeatLogLevel]);
+ strPrefix = StringUtils::Format(prefixFormat,
+ time.wHour,
+ time.wMinute,
+ time.wSecond,
+ (uint64_t)CThread::GetCurrentThreadId(),
+ levelNames[m_repeatLogLevel]);
- strData2.Format("Previous line repeats %d times." LINE_ENDING, m_repeatCount);
+ CStdString strData2 = StringUtils::Format("Previous line repeats %d times."
+ LINE_ENDING,
+ m_repeatCount);
fputs(strPrefix.c_str(), m_file);
fputs(strData2.c_str(), m_file);
OutputDebugString(strData2);
strData.Replace("\n", LINE_ENDING" ");
strData += LINE_ENDING;
- strPrefix.Format(prefixFormat, time.wHour, time.wMinute, time.wSecond, (uint64_t)CThread::GetCurrentThreadId(), levelNames[loglevel]);
+ strPrefix = StringUtils::Format(prefixFormat,
+ time.wHour,
+ time.wMinute,
+ time.wSecond,
+ (uint64_t)CThread::GetCurrentThreadId(),
+ levelNames[loglevel]);
//print to adb
#if defined(TARGET_ANDROID) && defined(_DEBUG)
{
// the log folder location is initialized in the CAdvancedSettings
// constructor and changed in CApplication::Create()
- CStdString strLogFile, strLogFileOld;
-
- strLogFile.Format("%sxbmc.log", path);
- strLogFileOld.Format("%sxbmc.old.log", path);
+ CStdString strLogFile = StringUtils::Format("%sxbmc.log", path);
+ CStdString strLogFileOld = StringUtils::Format("%sxbmc.old.log", path);
#if defined(TARGET_WINDOWS)
// the appdata folder might be redirected to an unc share
Log(LOGDEBUG, "MEM_DUMP: Dumping from %p", pData);
for (int i = 0; i < length; i+=16)
{
- CStdString strLine;
- strLine.Format("MEM_DUMP: %04x ", i);
+ CStdString strLine = StringUtils::Format("MEM_DUMP: %04x ", i);
char *alpha = pData;
for (int k=0; k < 4 && i + 4*k < length; k++)
{
for (int j=0; j < 4 && i + 4*k + j < length; j++)
{
- CStdString strFormat;
- strFormat.Format(" %02x", (unsigned char)*pData++);
+ CStdString strFormat = StringUtils::Format(" %02x", (unsigned char)*pData++);
strLine += strFormat;
}
strLine += " ";