|
|
@ -10,6 +10,7 @@ import os |
|
|
|
import sys |
|
|
|
import sys |
|
|
|
import shutil |
|
|
|
import shutil |
|
|
|
import tempfile |
|
|
|
import tempfile |
|
|
|
|
|
|
|
import time |
|
|
|
import traceback |
|
|
|
import traceback |
|
|
|
|
|
|
|
|
|
|
|
from .util import ( |
|
|
|
from .util import ( |
|
|
@ -202,6 +203,7 @@ class BitcoinTestFramework(object): |
|
|
|
ch.setLevel(ll) |
|
|
|
ch.setLevel(ll) |
|
|
|
# Format logs the same as bitcoind's debug.log with microprecision (so log files can be concatenated and sorted) |
|
|
|
# Format logs the same as bitcoind's debug.log with microprecision (so log files can be concatenated and sorted) |
|
|
|
formatter = logging.Formatter(fmt = '%(asctime)s.%(msecs)03d000 %(name)s (%(levelname)s): %(message)s', datefmt='%Y-%m-%d %H:%M:%S') |
|
|
|
formatter = logging.Formatter(fmt = '%(asctime)s.%(msecs)03d000 %(name)s (%(levelname)s): %(message)s', datefmt='%Y-%m-%d %H:%M:%S') |
|
|
|
|
|
|
|
formatter.converter = time.gmtime |
|
|
|
fh.setFormatter(formatter) |
|
|
|
fh.setFormatter(formatter) |
|
|
|
ch.setFormatter(formatter) |
|
|
|
ch.setFormatter(formatter) |
|
|
|
# add the handlers to the logger |
|
|
|
# add the handlers to the logger |
|
|
|