aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-04-23 09:25:34 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-04-23 09:25:34 +0200
commitaee80b0ef9f9e82fb696ca3a05c06f089926bf04 (patch)
tree43596e0e25e3e297f71ed1870532b2211257bd6c /src
parent65d7083f152e480b20235a65109ed009e840b18d (diff)
qt: Don't log to console by default
Default `-printtoconsole` to false for the GUI. GUI programs should not print to the console unnecessarily. For example, when launched by the window manager, the output might end up in the X session log file, resulting in duplicate logging. On Windows, it is pointless as well because bitcoin-qt isn't a console application.
Diffstat (limited to 'src')
-rw-r--r--src/qt/bitcoin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 599c3c0985..57fe4552a1 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -403,6 +403,10 @@ void BitcoinApplication::startThread()
void BitcoinApplication::parameterSetup()
{
+ // Default printtoconsole to false for the GUI. GUI programs should not
+ // print to the console unnecessarily.
+ gArgs.SoftSetBoolArg("-printtoconsole", false);
+
m_node.initLogging();
m_node.initParameterInteraction();
}