From faafa801e885ec20c8e4307f1dc1617ee0c04998 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 5 Apr 2017 01:18:12 +0200 Subject: [PATCH] init: Remove redundant logging code --- src/init.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 59e5a4a20..f8f0edcbe 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -444,8 +444,6 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-debug=", strprintf(_("Output debugging information (default: %u, supplying is optional)"), 0) + ". " + _("If is not supplied or if = 1, output all debugging information.") + " " + _(" can be:") + " " + ListLogCategories() + "."); strUsage += HelpMessageOpt("-debugexclude=", strprintf(_("Exclude debugging information for a category. Can be used in conjunction with -debug=1 to output debug logs for all categories except one or more specified categories."))); - if (showDebug) - strUsage += HelpMessageOpt("-nodebug", "Turn off debugging messages, same as -debug=0"); strUsage += HelpMessageOpt("-help-debug", _("Show all debugging options (usage: --help -help-debug)")); strUsage += HelpMessageOpt("-logips", strprintf(_("Include IP addresses in debug output (default: %u)"), DEFAULT_LOGIPS)); strUsage += HelpMessageOpt("-logtimestamps", strprintf(_("Prepend debug output with timestamp (default: %u)"), DEFAULT_LOGTIMESTAMPS)); @@ -906,12 +904,11 @@ bool AppInitParameterInteraction() InitWarning(strprintf(_("Reducing -maxconnections from %d to %d, because of system limitations."), nUserMaxConnections, nMaxConnections)); // ********************************************************* Step 3: parameter-to-internal-flags - if (mapMultiArgs.count("-debug") > 0) { // Special-case: if -debug=0/-nodebug is set, turn off debugging messages const std::vector& categories = mapMultiArgs.at("-debug"); - if (!(GetBoolArg("-nodebug", false) || find(categories.begin(), categories.end(), std::string("0")) != categories.end())) { + if (find(categories.begin(), categories.end(), std::string("0")) == categories.end()) { for (const auto& cat : categories) { uint32_t flag; if (!GetLogCategory(&flag, &cat)) {