diff options
| author | Mikhail Shchatko <mikhail.shchatko@mongodb.com> | 2024-08-02 22:07:50 +0300 |
|---|---|---|
| committer | MongoDB Bot <mongo-bot@mongodb.com> | 2024-08-02 19:54:42 +0000 |
| commit | d2ea4f5b25ffc4cf405a64e982d7084bcce6d4f3 (patch) | |
| tree | c4ca3553ea2e28c20064c5fa471d2fc7e67661ad | |
| parent | c73c473d4c80ed172fb2eecb0c99d2d2d4e06b02 (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.py | 2 |
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.""" |
