Skip to content

Commit bdda14d

Browse files
author
MarcoFalke
committed
Merge #13055: qt: Don't log to console by default
aee80b0 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
2 parents a49381d + aee80b0 commit bdda14d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/qt/bitcoin.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,10 @@ void BitcoinApplication::startThread()
403403

404404
void BitcoinApplication::parameterSetup()
405405
{
406+
// Default printtoconsole to false for the GUI. GUI programs should not
407+
// print to the console unnecessarily.
408+
gArgs.SoftSetBoolArg("-printtoconsole", false);
409+
406410
m_node.initLogging();
407411
m_node.initParameterInteraction();
408412
}

0 commit comments

Comments
 (0)