summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Shchatko <mikhail.shchatko@mongodb.com>2024-08-02 22:07:23 +0300
committerMongoDB Bot <mongo-bot@mongodb.com>2024-08-02 19:56:22 +0000
commit76405a367d5a09e12594f1d2fa030deba82ddd38 (patch)
treee9b7dbfac38234bc3b01d0128d71a3ad2267ad87
parent98a13ecd75cd709ccea1fb934a14b5f721497a6d (diff)
SERVER-91108: Log with utf-8 encoding to avoid charmap errors on Windows (#25683)
GitOrigin-RevId: fb8885dc9b43f1f8f9e360cfad0e2808f7cdf214
-rw-r--r--buildscripts/resmokelib/logging/handlers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/buildscripts/resmokelib/logging/handlers.py b/buildscripts/resmokelib/logging/handlers.py
index 92b1c12a322..3b2d905952f 100644
--- a/buildscripts/resmokelib/logging/handlers.py
+++ b/buildscripts/resmokelib/logging/handlers.py
@@ -237,7 +237,7 @@ class BufferedFileHandler(BufferedHandler):
def __init__(self, filename, capacity=2000, interval_secs=600):
"""Initialize the handler with the filename and buffer capacity and flush interval."""
super().__init__(capacity, interval_secs)
- self.file = open(filename, "a")
+ self.file = open(filename, "a", encoding="utf-8")
def process_record(self, record):
"""Return the formatted record message appended with a newline."""