Print to console by default when not run with -daemon
Summary:
Printing to the debug log file can be disabled with -nodebulogfile
Backport of core PR13004, PR13614 and PR13625:
https://github.com/bitcoin/bitcoin/pull/13004/files
https://github.com/bitcoin/bitcoin/pull/13614/files
https://github.com/bitcoin/bitcoin/pull/13625/files
Test Plan:
./test/functional/test_runner.py feature_logging
Run bitcoind with no argument and check it outputs to console and log
file.
Run bitcoind with -daemon and check it outputs to log file only.
Run bitcoind with -noprinttoconsole and check it outputs to log file
only.
Run bitcoind with -nodebuglogfile and check it outputs console only.
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D4511