diff --git a/confluent_server/confluent/log.py b/confluent_server/confluent/log.py index 8a978490..ee2444c1 100644 --- a/confluent_server/confluent/log.py +++ b/confluent_server/confluent/log.py @@ -600,7 +600,11 @@ class Logger(object): if ltype == 2: textrecord = data else: - textrecord = textdate + data + ']' + if not isinstance(textdate, bytes): + textdate = textdate.encode('utf-8') + if not isinstance(data, bytes): + data = data.encode('utf-8') + textrecord = textdate + data + b']' else: textrecord = textdate + data if not textrecord.endswith('\n'): @@ -798,4 +802,4 @@ def logtrace(): if tracelog is None: tracelog = Logger('trace', buffered=False) tracelog.log(traceback.format_exc(), ltype=DataTypes.event, - event=Events.stacktrace) \ No newline at end of file + event=Events.stacktrace)