From 1dd40d36a153a08ffd114afe6d81ac673da740f6 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 20 Jul 2017 11:05:06 -0400 Subject: [PATCH] Breakup logentries exceeding 65k The data length of a log entry must not exceed 65k. If an attempt is made to log that much, break it up and duplicate the records. It may make sense to indicate a continuation explicitly, but for now just extend. --- confluent_server/confluent/log.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/confluent_server/confluent/log.py b/confluent_server/confluent/log.py index bf468827..575d06bf 100644 --- a/confluent_server/confluent/log.py +++ b/confluent_server/confluent/log.py @@ -540,6 +540,12 @@ class Logger(object): tstamp = entry[1] data = entry[2] evtdata = entry[3] + if len(data) > 65535: + # our max log entry is 65k, take only the first 65k and put + # rest back on as a continuation + entry[2] = data[65535:] + self.logentries.appendleft(entry) + data = data[:65535] textdate = '' if self.isconsole and ltype != 2: textdate = time.strftime(