diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-12-20 15:03:27 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-12-20 15:03:41 +0100 |
commit | f498d43ee2ebc1507ca0d649af6bffd1b3182646 (patch) | |
tree | 3e8b9ebd9193fe6d080f673d87519a0a037b7290 | |
parent | 23981b1f47a6b1ace419934a07282c5a15441f94 (diff) | |
parent | 9e9056cd1a05e5868025553d2a8cb3e47cf45045 (diff) |
Merge pull request #3416
9e9056c Remove -logtodebugger (Wladimir J. van der Laan)
-rw-r--r-- | src/init.cpp | 5 | ||||
-rw-r--r-- | src/test/test_bitcoin.cpp | 2 | ||||
-rw-r--r-- | src/util.cpp | 27 | ||||
-rw-r--r-- | src/util.h | 2 |
4 files changed, 4 insertions, 32 deletions
diff --git a/src/init.cpp b/src/init.cpp index 28f6e08f9a..c568b1a1c2 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -242,10 +242,6 @@ std::string HelpMessage(HelpMessageMode hmm) strUsage += " -printtoconsole " + _("Send trace/debug info to console instead of debug.log file") + "\n"; strUsage += " -regtest " + _("Enter regression test mode, which uses a special chain in which blocks can be " "solved instantly. This is intended for regression testing tools and app development.") + "\n"; -#ifdef WIN32 - strUsage += " -printtodebugger " + _("Send trace/debug info to debugger") + "\n"; -#endif - if (hmm == HMM_BITCOIN_QT) { strUsage += " -server " + _("Accept command line and JSON-RPC commands") + "\n"; @@ -493,7 +489,6 @@ bool AppInit2(boost::thread_group& threadGroup, bool fForceServer) fServer = GetBoolArg("-server", false); fPrintToConsole = GetBoolArg("-printtoconsole", false); - fPrintToDebugger = GetBoolArg("-printtodebugger", false); fLogTimestamps = GetBoolArg("-logtimestamps", true); #ifdef ENABLE_WALLET bool fDisableWallet = GetBoolArg("-disablewallet", false); diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp index 667bdfb62e..96d0712403 100644 --- a/src/test/test_bitcoin.cpp +++ b/src/test/test_bitcoin.cpp @@ -26,7 +26,7 @@ struct TestingSetup { boost::thread_group threadGroup; TestingSetup() { - fPrintToDebugger = true; // don't want to write to debug.log file + fPrintToDebugLog = false; // don't want to write to debug.log file noui_connect(); #ifdef ENABLE_WALLET bitdb.MakeMock(); diff --git a/src/util.cpp b/src/util.cpp index bedf59767b..280798f2fb 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -88,7 +88,7 @@ map<string, string> mapArgs; map<string, vector<string> > mapMultiArgs; bool fDebug = false; bool fPrintToConsole = false; -bool fPrintToDebugger = false; +bool fPrintToDebugLog = true; bool fDaemon = false; bool fServer = false; string strMiscWarning; @@ -270,7 +270,7 @@ int LogPrint(const char* category, const char* pszFormat, ...) ret += vprintf(pszFormat, arg_ptr); va_end(arg_ptr); } - else if (!fPrintToDebugger) + else if (fPrintToDebugLog) { static bool fStartedNewLine = true; boost::call_once(&DebugPrintInit, debugPrintInitFlag); @@ -302,29 +302,6 @@ int LogPrint(const char* category, const char* pszFormat, ...) va_end(arg_ptr); } -#ifdef WIN32 - if (fPrintToDebugger) - { - // accumulate and output a line at a time - static std::string buffer; - - boost::mutex::scoped_lock scoped_lock(*mutexDebugLog); - - va_list arg_ptr; - va_start(arg_ptr, pszFormat); - buffer += vstrprintf(pszFormat, arg_ptr); - va_end(arg_ptr); - - int line_start = 0, line_end; - while((line_end = buffer.find('\n', line_start)) != -1) - { - OutputDebugStringA(buffer.substr(line_start, line_end - line_start).c_str()); - line_start = line_end + 1; - ret += line_end-line_start; - } - buffer.erase(0, line_start); - } -#endif return ret; } diff --git a/src/util.h b/src/util.h index 9c7f185f13..3922872e06 100644 --- a/src/util.h +++ b/src/util.h @@ -120,7 +120,7 @@ extern std::map<std::string, std::string> mapArgs; extern std::map<std::string, std::vector<std::string> > mapMultiArgs; extern bool fDebug; extern bool fPrintToConsole; -extern bool fPrintToDebugger; +extern bool fPrintToDebugLog; extern bool fDaemon; extern bool fServer; extern std::string strMiscWarning; |