Skip to content

Commit

Permalink
1.6.1dev: ensure utf-8 encoding is used when writing to log file (clo…
Browse files Browse the repository at this point in the history
…ses #13751)

git-svn-id: http://trac.edgewall.org/intertrac/log:/branches/1.6-stable@17804 af82e41b-90c4-0310-8c96-b1721e28e2e2
  • Loading branch information
jomae committed May 24, 2024
1 parent d7a4fc4 commit bba1b85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trac/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def logger_handler_factory(logtype='syslog', logfile=None, level='WARNING',
logger = logging.getLogger(logid)
logtype = logtype.lower()
if logtype == 'file':
hdlr = logging.FileHandler(logfile)
hdlr = logging.FileHandler(logfile, encoding='utf-8')
elif logtype in ('eventlog', 'winlog', 'nteventlog'):
# Requires win32 extensions
hdlr = logging.handlers.NTEventLogHandler(logid,
Expand Down

0 comments on commit bba1b85

Please sign in to comment.