Skip to content

Commit

Permalink
Python functional tests should log in UTC
Browse files Browse the repository at this point in the history
bitcoind logs use UTC. Python functional tests should also log in UTC.
  • Loading branch information
jnewbery committed Mar 21, 2017
1 parent 61d75f5 commit 8317a45
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/functional/test_framework/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import sys
import shutil
import tempfile
import time
import traceback

from .util import (
Expand Down Expand Up @@ -202,6 +203,7 @@ def _start_logging(self):
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
Expand Down

0 comments on commit 8317a45

Please sign in to comment.