2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-02-06 22:12:45 +00:00

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.
This commit is contained in:
Jarrod Johnson 2017-07-20 11:05:06 -04:00
parent 5a2e4a669b
commit 1dd40d36a1

View File

@ -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(