qa: Log as utf-8
This commit is contained in:
parent
3d3d8ae3a0
commit
fa8071a098
2 changed files with 2 additions and 2 deletions
|
@ -63,7 +63,7 @@ def get_log_events(source, logfile):
|
||||||
Log events may be split over multiple lines. We use the timestamp
|
Log events may be split over multiple lines. We use the timestamp
|
||||||
regex match as the marker for a new log event."""
|
regex match as the marker for a new log event."""
|
||||||
try:
|
try:
|
||||||
with open(logfile, 'r') as infile:
|
with open(logfile, 'r', encoding='utf-8') as infile:
|
||||||
event = ''
|
event = ''
|
||||||
timestamp = ''
|
timestamp = ''
|
||||||
for line in infile:
|
for line in infile:
|
||||||
|
|
|
@ -359,7 +359,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
||||||
self.log = logging.getLogger('TestFramework')
|
self.log = logging.getLogger('TestFramework')
|
||||||
self.log.setLevel(logging.DEBUG)
|
self.log.setLevel(logging.DEBUG)
|
||||||
# Create file handler to log all messages
|
# Create file handler to log all messages
|
||||||
fh = logging.FileHandler(self.options.tmpdir + '/test_framework.log')
|
fh = logging.FileHandler(self.options.tmpdir + '/test_framework.log', encoding='utf-8')
|
||||||
fh.setLevel(logging.DEBUG)
|
fh.setLevel(logging.DEBUG)
|
||||||
# Create console handler to log messages to stderr. By default this logs only error messages, but can be configured with --loglevel.
|
# Create console handler to log messages to stderr. By default this logs only error messages, but can be configured with --loglevel.
|
||||||
ch = logging.StreamHandler(sys.stdout)
|
ch = logging.StreamHandler(sys.stdout)
|
||||||
|
|
Loading…
Reference in a new issue