Python functional tests should log in UTC

bitcoind logs use UTC. Python functional tests should also log in UTC.
This commit is contained in:
John Newbery 2017-03-21 10:05:59 -04:00
parent 61d75f587d
commit 8317a45161
1 changed files with 2 additions and 0 deletions

View File

@ -10,6 +10,7 @@ import os
import sys
import shutil
import tempfile
import time
import traceback
from .util import (
@ -202,6 +203,7 @@ class BitcoinTestFramework(object):
ch.setLevel(ll)
# 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.converter = time.gmtime
fh.setFormatter(formatter)
ch.setFormatter(formatter)
# add the handlers to the logger