Commit 42ead48d authored by Vinay Sajip's avatar Vinay Sajip

Issue #7077: logging: SysLogHandler now treats Unicode as per RFC 5424.

parent ff8c1e5a
......@@ -779,6 +779,10 @@ class SysLogHandler(logging.Handler):
self.encodePriority(self.facility,
self.mapPriority(record.levelname)),
msg)
#Message is a string. Convert to bytes as required by RFC 5424
msg = msg.encode('utf-8')
if codecs:
msg = codecs.BOM_UTF8 + msg
try:
if self.unixsocket:
try:
......
......@@ -104,6 +104,8 @@ C-API
Library
-------
- Issue #7077: logging: SysLogHandler now treats Unicode as per RFC 5424.
- Issue #7099: Decimal.is_normal now returns True for numbers with exponent
larger than emax.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment