diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-04-23 19:29:53 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-04-23 19:29:55 -0400 |
commit | bdda14d1c01c253a5c553b3b02a82a856b6a1f92 (patch) | |
tree | 9c1d830462a9dc90dad6ff083ecd70884c32cf52 | |
parent | a49381dfa3eec7765a842d3b990876e7f6b54f72 (diff) | |
parent | aee80b0ef9f9e82fb696ca3a05c06f089926bf04 (diff) |
Merge #13055: qt: Don't log to console by default
aee80b0ef9 qt: Don't log to console by default (Wladimir J. van der Laan)
Pull request description:
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.
This same mechanism is used to set `-server` to true by default for bitcoind: https://github.com/bitcoin/bitcoin/blob/master/src/bitcoind.cpp#L116
(fixes #13004)
Tree-SHA512: 24ae460d9d97130a063f7bf7fa6da1e6cc46643a94ea0827aa64d0f4a80647e5e7394695b24ea0f49a147a1fa07329659d224f04511fc24b97a9869d1c29b890
-rw-r--r-- | src/qt/bitcoin.cpp | 4 |
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(); } |