expose fPrintToDebugLog to cmd-line as -printtodebuglog option

Closes #679
This commit is contained in:
UdjinM6 2016-01-24 21:39:44 +03:00 committed by Holger Schinzel
parent 3f4d5c4c7d
commit 93279e7944

View File

@ -396,6 +396,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += " -maxsigcachesize=<n> " + strprintf(_("Limit size of signature cache to <n> entries (default: %u)"), 50000) + "\n"; strUsage += " -maxsigcachesize=<n> " + strprintf(_("Limit size of signature cache to <n> entries (default: %u)"), 50000) + "\n";
} }
strUsage += " -minrelaytxfee=<amt> " + strprintf(_("Fees (in DASH/Kb) smaller than this are considered zero fee for relaying (default: %s)"), FormatMoney(::minRelayTxFee.GetFeePerK())) + "\n"; strUsage += " -minrelaytxfee=<amt> " + strprintf(_("Fees (in DASH/Kb) smaller than this are considered zero fee for relaying (default: %s)"), FormatMoney(::minRelayTxFee.GetFeePerK())) + "\n";
strUsage += " -printtodebuglog " + strprintf(_("Send trace/debug info to debug.log file (default: %u)"), 1) + "\n";
strUsage += " -printtoconsole " + strprintf(_("Send trace/debug info to console instead of debug.log file (default: %u)"), 0) + "\n"; strUsage += " -printtoconsole " + strprintf(_("Send trace/debug info to console instead of debug.log file (default: %u)"), 0) + "\n";
if (GetBoolArg("-help-debug", false)) if (GetBoolArg("-help-debug", false))
{ {
@ -642,6 +643,7 @@ bool AppInit2(boost::thread_group& threadGroup)
// ********************************************************* Step 2: parameter interactions // ********************************************************* Step 2: parameter interactions
// Set this early so that parameter interactions go to console // Set this early so that parameter interactions go to console
fPrintToConsole = GetBoolArg("-printtoconsole", false); fPrintToConsole = GetBoolArg("-printtoconsole", false);
fPrintToDebugLog = GetBoolArg("-printtodebuglog", true) && !fPrintToConsole;
fLogTimestamps = GetBoolArg("-logtimestamps", true); fLogTimestamps = GetBoolArg("-logtimestamps", true);
fLogIPs = GetBoolArg("-logips", false); fLogIPs = GetBoolArg("-logips", false);