Skip to content

Commit 5315660

Browse files
committed
Merge #13440: qa: Log as utf-8
fa8071a qa: Log as utf-8 (MarcoFalke) Pull request description: Explicitly read and write the log files with utf-8 as encoding Tree-SHA512: ca28f37f34a09845c736ff6c4c21733c3c39584f52c81e48ff25e5e35979c317d0989862b2b93acc7e359fbcc20b99533365455830b2ddb41eb4d8c17314534e
2 parents b22115d + fa8071a commit 5315660

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/functional/combine_logs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def get_log_events(source, logfile):
6363
Log events may be split over multiple lines. We use the timestamp
6464
regex match as the marker for a new log event."""
6565
try:
66-
with open(logfile, 'r') as infile:
66+
with open(logfile, 'r', encoding='utf-8') as infile:
6767
event = ''
6868
timestamp = ''
6969
for line in infile:

test/functional/test_framework/test_framework.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ def _start_logging(self):
359359
self.log = logging.getLogger('TestFramework')
360360
self.log.setLevel(logging.DEBUG)
361361
# Create file handler to log all messages
362-
fh = logging.FileHandler(self.options.tmpdir + '/test_framework.log')
362+
fh = logging.FileHandler(self.options.tmpdir + '/test_framework.log', encoding='utf-8')
363363
fh.setLevel(logging.DEBUG)
364364
# Create console handler to log messages to stderr. By default this logs only error messages, but can be configured with --loglevel.
365365
ch = logging.StreamHandler(sys.stdout)

0 commit comments

Comments
 (0)