diff --git a/src/init.cpp b/src/init.cpp index cadccbd95f..3ed657c4c5 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1206,8 +1206,10 @@ bool AppInitParameterInteraction() // Special-case: if -debug=0/-nodebug is set, turn off debugging messages if (fDebug) { const std::vector& categories = mapMultiArgs.at("-debug"); - if (GetBoolArg("-nodebug", false) || find(categories.begin(), categories.end(), std::string("0")) != categories.end()) + if (GetBoolArg("-nodebug", false) || find(categories.begin(), categories.end(), std::string("0")) != categories.end()) { fDebug = false; + fNoDebug = true; + } } // Check for -debugnet diff --git a/src/util.cpp b/src/util.cpp index bb4b630b81..68b3804f7f 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -121,6 +121,7 @@ const map >& mapMultiArgs = _mapMultiArgs; bool fDebug = false; bool fPrintToConsole = false; bool fPrintToDebugLog = true; +bool fNoDebug = false; //A temporary fix for https://github.com/firoorg/firo/issues/1011 bool fLogTimestamps = DEFAULT_LOGTIMESTAMPS; bool fLogTimeMicros = DEFAULT_LOGTIMEMICROS; @@ -307,6 +308,10 @@ static std::string LogTimestampStr(const std::string &str, std::atomic_bool *fSt int LogPrintStr(const std::string &str) { + //A temporary fix for https://github.com/firoorg/firo/issues/1011 + if (fNoDebug && str.compare(0, 6, "ERROR:", 0, 6) != 0) + return 0; + int ret = 0; // Returns total number of characters written static std::atomic_bool fStartedNewLine(true); diff --git a/src/util.h b/src/util.h index 507d0cd779..bdb829abd4 100644 --- a/src/util.h +++ b/src/util.h @@ -56,6 +56,7 @@ extern const std::map >& mapMultiArgs; extern bool fDebug; extern bool fPrintToConsole; extern bool fPrintToDebugLog; +extern bool fNoDebug; extern bool fLogTimestamps; extern bool fLogTimeMicros;