mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Refactor: OutputDebugStringF -> LogPrint(category, ...)
This commit is contained in:
10
src/util.cpp
10
src/util.cpp
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user