Changeset View
Changeset View
Standalone View
Standalone View
test/functional/combine_logs.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2017-2020 The Bitcoin developers | # Copyright (c) 2017-2020 The Bitcoin developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
"""Combine logs from multiple bitcoin nodes as well as the test_framework log. | """Combine logs from multiple bitcoin nodes as well as the test_framework log. | ||||
This streams the combined log output to stdout. Use combine_logs.py > outputfile | This streams the combined log output to stdout. Use combine_logs.py > outputfile | ||||
to write to an outputfile. | to write to an outputfile. | ||||
If no argument is provided, the most recent test directory will be used.""" | If no argument is provided, the most recent test directory will be used.""" | ||||
import argparse | import argparse | ||||
from collections import defaultdict, namedtuple | |||||
import heapq | import heapq | ||||
import itertools | import itertools | ||||
import os | import os | ||||
import pathlib | import pathlib | ||||
import re | import re | ||||
import sys | import sys | ||||
import tempfile | import tempfile | ||||
from collections import defaultdict, namedtuple | |||||
# N.B.: don't import any local modules here - this script must remain executable | # N.B.: don't import any local modules here - this script must remain executable | ||||
# without the parent module installed. | # without the parent module installed. | ||||
# Should match same symbol in `test_framework.test_framework`. | # Should match same symbol in `test_framework.test_framework`. | ||||
TMPDIR_PREFIX = "bitcoin_func_test_" | TMPDIR_PREFIX = "bitcoin_func_test_" | ||||
# Matches on the date format at the start of the log event | # Matches on the date format at the start of the log event | ||||
▲ Show 20 Lines • Show All 195 Lines • Show Last 20 Lines |