mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-23 01:53:28 +00:00
Handle unicode string from a console plugin
If a console plugin feels like outputting data in a unicode string, accept that data by encoding to utf-8.
This commit is contained in:
parent
7a8fbe7d62
commit
9868e55958
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user