summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Shchatko <mikhail.shchatko@mongodb.com>2024-08-02 22:07:50 +0300
committerMongoDB Bot <mongo-bot@mongodb.com>2024-08-02 19:54:42 +0000
commitd2ea4f5b25ffc4cf405a64e982d7084bcce6d4f3 (patch)
treec4ca3553ea2e28c20064c5fa471d2fc7e67661ad
parentc73c473d4c80ed172fb2eecb0c99d2d2d4e06b02 (diff)
SERVER-91108: Log with utf-8 encoding to avoid charmap errors on Windows (#25684)
GitOrigin-RevId: 03b971bacf374cfe0d08f17b823a535b49a2183c
-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."""