diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2013-09-18 18:03:21 +1000 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2013-09-18 20:39:24 +1000 |
commit | e51321fb75f00194425e5ecc8ad77fd6762ec221 (patch) | |
tree | 586ba556ba95900b8bb5b5440cb957a096e77528 /src/util.h | |
parent | b16e9f02c82b98635da53c7e485614cba766f0a9 (diff) |
Refactor: OutputDebugStringF -> LogPrint(category, ...)
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/util.h b/src/util.h index d0bd16c1c9..a1b6c7fcdd 100644 --- a/src/util.h +++ b/src/util.h @@ -153,7 +153,9 @@ extern volatile bool fReopenDebugLog; void RandAddSeed(); void RandAddSeedPerfmon(); -int ATTR_WARN_PRINTF(1,2) OutputDebugStringF(const char* pszFormat, ...); + +// Print to debug.log if -debug=category switch is given OR category is NULL. +int ATTR_WARN_PRINTF(2,3) LogPrint(const char* category, const char* pszFormat, ...); /* Rationale for the real_strprintf / strprintf construction: @@ -179,7 +181,7 @@ bool ATTR_WARN_PRINTF(1,2) error(const char *format, ...); * __attribute__((format(printf,X,Y))) gets expanded to __attribute__((format(OutputDebugStringF,X,Y))) * which confuses gcc. */ -#define printf OutputDebugStringF +#define printf(...) LogPrint(NULL, __VA_ARGS__) void LogException(std::exception* pex, const char* pszThread); void PrintException(std::exception* pex, const char* pszThread); |