diff options
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/util.cpp b/src/util.cpp index 16c8f3fc17..466f6ddff6 100644 --- a/src/util.cpp +++ b/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) { |