2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-23 01:53:28 +00:00

Merge pull request #46 from jjohnson42/handleunicodestringoutput

Handle unicode string from a console plugin
This commit is contained in:
Jarrod Johnson 2015-10-21 13:26:32 -04:00
commit 80aa2c477a

View File

@ -365,7 +365,10 @@ class _ConsoleHandler(object):
eventdata |= 2
self.log(data, eventdata=eventdata)
self.lasttime = util.monotonic_time()
self.buffer += data
if isinstance(data, bytearray) or isinstance(data, bytes):
self.buffer += data
else:
self.buffer += data.encode('utf-8')
#TODO: analyze buffer for registered events, examples:
# panics
# certificate signing request