test/functional/combine_logs.py
def read_logs(tmp_dir):
    """Reads log files.

    Delegates to generator function get_log_events() to provide individual log events
    for each of the input log files."""

    # Find out what the folder is called that holds the debug.log file
    chain = glob.glob("{}/node0/*/debug.log".format(tmp_dir))
    if chain:
        chain = chain[0]  # pick the first one if more than one chain was found (should never happen)
        chain = re.search('node0/(.+?)/debug\.log$', chain).group(1)  # extract the chain name
    else:
        chain = 'regtest'  # fallback to regtest (should only happen when none exists)

    files = [("test", "%s/test_framework.log" % tmp_dir)]
    for i in itertools.count():
        logfile = "{}/node{}/{}/debug.log".format(tmp_dir, i, chain)
        if not os.path.isfile(logfile):
            break
        files.append(("node%d" % i, logfile))

    return heapq.merge(*[get_log_events(source, f) for source, f in files])
Reads log files.

    Delegates to generator function get_log_events() to provide individual log events
    for each of the input log files.
Reads log files.
Delegates to generator function get_log_events() to provide individual log events
for each of the input log files.
Reads log files . Delegates to generator function get_log_events () to provide individual log events for each of the input log files .
def read_logs(tmp_dir):
    chain = glob.glob("{}/node0/*/debug.log".format(tmp_dir))
    if chain:
        chain = chain[0]  
        chain = re.search('node0/(.+?)/debug\.log$', chain).group(1)  
    else:
        chain = 'regtest'  
    files = [("test", "%s/test_framework.log" % tmp_dir)]
    for i in itertools.count():
        logfile = "{}/node{}/{}/debug.log".format(tmp_dir, i, chain)
        if not os.path.isfile(logfile):
            break
        files.append(("node%d" % i, logfile))
    return heapq.merge(*[get_log_events(source, f) for source, f in files])
def read_logs ( tmp_dir ) : chain = glob . glob ( "{}/node0/*/debug.log" . format ( tmp_dir ) ) if chain : chain = chain [ 0 ] chain = re . search ( 'node0/(.+?)/debug\.log$' , chain ) . group ( 1 ) else : chain = 'regtest' files = [ ( "test" , "%s/test_framework.log" % tmp_dir ) ] for i in itertools . count ( ) : logfile = "{}/node{}/{}/debug.log" . format ( tmp_dir , i , chain ) if not os . path . isfile ( logfile ) : break files . append ( ( "node%d" % i , logfile ) ) return heapq . merge ( * [ get_log_events ( source , f ) for source , f in files ] )
Reads log files.
Reads log files .
"""Reads log files.

    Delegates to generator function get_log_events() to provide individual log events
    for each of the input log files.""" # Find out what the folder is called that holds the debug.log file # pick the first one if more than one chain was found (should never happen) # extract the chain name # fallback to regtest (should only happen when none exists)
tmp_dir