Skip to content

Commit faafa80

Browse files
author
MarcoFalke
committed
init: Remove redundant logging code
1 parent 080d7c7 commit faafa80

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/init.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,6 @@ std::string HelpMessage(HelpMessageMode mode)
444444
strUsage += HelpMessageOpt("-debug=<category>", strprintf(_("Output debugging information (default: %u, supplying <category> is optional)"), 0) + ". " +
445445
_("If <category> is not supplied or if <category> = 1, output all debugging information.") + " " + _("<category> can be:") + " " + ListLogCategories() + ".");
446446
strUsage += HelpMessageOpt("-debugexclude=<category>", 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.")));
447-
if (showDebug)
448-
strUsage += HelpMessageOpt("-nodebug", "Turn off debugging messages, same as -debug=0");
449447
strUsage += HelpMessageOpt("-help-debug", _("Show all debugging options (usage: --help -help-debug)"));
450448
strUsage += HelpMessageOpt("-logips", strprintf(_("Include IP addresses in debug output (default: %u)"), DEFAULT_LOGIPS));
451449
strUsage += HelpMessageOpt("-logtimestamps", strprintf(_("Prepend debug output with timestamp (default: %u)"), DEFAULT_LOGTIMESTAMPS));
@@ -906,12 +904,11 @@ bool AppInitParameterInteraction()
906904
InitWarning(strprintf(_("Reducing -maxconnections from %d to %d, because of system limitations."), nUserMaxConnections, nMaxConnections));
907905

908906
// ********************************************************* Step 3: parameter-to-internal-flags
909-
910907
if (mapMultiArgs.count("-debug") > 0) {
911908
// Special-case: if -debug=0/-nodebug is set, turn off debugging messages
912909
const std::vector<std::string>& categories = mapMultiArgs.at("-debug");
913910

914-
if (!(GetBoolArg("-nodebug", false) || find(categories.begin(), categories.end(), std::string("0")) != categories.end())) {
911+
if (find(categories.begin(), categories.end(), std::string("0")) == categories.end()) {
915912
for (const auto& cat : categories) {
916913
uint32_t flag;
917914
if (!GetLogCategory(&flag, &cat)) {

0 commit comments

Comments
 (0)