Log early messages with -printtoconsole

This ensures log messages prior to StartLogging() are replayed to
the console as well as to the debug log file.
This commit is contained in:
Anthony Towns
2018-05-03 11:09:28 +10:00
committed by MarcoFalke
parent 412987430c
commit 0b282f9b00
4 changed files with 48 additions and 31 deletions

View File

@ -61,9 +61,16 @@ class ConfArgsTest(BitcoinTestFramework):
with open(inc_conf_file2_path, 'w', encoding='utf-8') as conf:
conf.write('') # clear
def test_log_buffer(self):
with self.nodes[0].assert_debug_log(expected_msgs=['Warning: parsed potentially confusing double-negative -connect=0']):
self.start_node(0, extra_args=['-noconnect=0'])
self.stop_node(0)
def run_test(self):
self.stop_node(0)
self.test_log_buffer()
self.test_config_file_parser()
# Remove the -datadir argument so it doesn't override the config file