From cb873862411e2e40aea8225ee85ce710958024dd Mon Sep 17 00:00:00 2001 From: lpescher Date: Tue, 19 May 2015 22:14:35 -0600 Subject: [PATCH 1/3] Make command line option to show all debugging consistent with similar options Most people expect a value of 1 to enable all for command line arguments. However to do this for the -debug option you must type "-debug=". This has been changed to allow "-debug=1" as well as "-debug=" to enable all debug logging --- src/util.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util.cpp b/src/util.cpp index bfb95c904..33b5ee950 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -208,6 +208,7 @@ bool LogAcceptCategory(const char* category) // if not debugging everything and not debugging specific category, LogPrint does nothing. if (setCategories.count(string("")) == 0 && + setCategories.count(string("1")) == 0 && setCategories.count(string(category)) == 0) return false; } From f60bb5ee6dd5df93683f4966e46b649296ba9fe1 Mon Sep 17 00:00:00 2001 From: lpescher Date: Tue, 19 May 2015 22:29:59 -0600 Subject: [PATCH 2/3] Update documentation to match the #4219 change --- doc/developer-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/developer-notes.md b/doc/developer-notes.md index 8f7db31d5..7d3d78adf 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -102,7 +102,7 @@ CXXFLAGS="-g -ggdb -O0" or whatever debug flags you need. If the code is behaving strangely, take a look in the debug.log file in the data directory; error and debugging messages are written there. -The -debug=... command-line option controls debugging; running with just -debug will turn +The -debug=... command-line option controls debugging; running with just -debug or -debug=1 will turn on all categories (and give you a very large debug.log file). The Qt code routes qDebug() output to debug.log under category "qt": run with -debug=qt From aa41bc84b1f11d5afc968376a038d849321a06d2 Mon Sep 17 00:00:00 2001 From: lpescher Date: Tue, 19 May 2015 22:35:11 -0600 Subject: [PATCH 3/3] Update help message to match the #4219 change --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index 490ed6f54..7e9230a22 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -361,7 +361,7 @@ std::string HelpMessage(HelpMessageMode mode) if (mode == HMM_BITCOIN_QT) debugCategories += ", qt"; strUsage += HelpMessageOpt("-debug=", strprintf(_("Output debugging information (default: %u, supplying is optional)"), 0) + ". " + - _("If is not supplied, output all debugging information.") + _(" can be:") + " " + debugCategories + "."); + _("If is not supplied or if = 1, output all debugging information.") + _(" can be:") + " " + debugCategories + "."); #ifdef ENABLE_WALLET strUsage += HelpMessageOpt("-gen", strprintf(_("Generate coins (default: %u)"), 0)); strUsage += HelpMessageOpt("-genproclimit=", strprintf(_("Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)"), 1));