Refactor: OutputDebugStringF -> LogPrint(category, ...)

This commit is contained in:
Gavin Andresen
2013-09-18 18:03:21 +10:00
parent b16e9f02c8
commit e51321fb75
5 changed files with 16 additions and 8 deletions

View File

@@ -233,8 +233,16 @@ static void DebugPrintInit()
mutexDebugLog = new boost::mutex();
}
int OutputDebugStringF(const char* pszFormat, ...)
int LogPrint(const char* category, const char* pszFormat, ...)
{
if (category != NULL)
{
if (!fDebug) return 0;
const vector<string>& categories = mapMultiArgs["-debug"];
if (find(categories.begin(), categories.end(), string(category)) == categories.end())
return 0;
}
int ret = 0; // Returns total number of characters written
if (fPrintToConsole)
{