(grave) closes gh-2431: replace newlines in message from systemd journal (otherwise multi-line parsing is broken, because removal of matched string from multi-line buffer window is confused by extra new-lines, so they are retained and got matched on every followed message).

pull/2369/merge
sebres 2019-05-24 15:53:16 +02:00
parent 7a463eb3f7
commit 83f626c4aa
1 changed files with 1 additions and 1 deletions

View File

@ -232,7 +232,7 @@ class FilterSystemd(JournalFilter): # pragma: systemd no cover
logSys.debug("Read systemd journal entry: %r" % logSys.debug("Read systemd journal entry: %r" %
"".join([date.isoformat(), logline])) "".join([date.isoformat(), logline]))
## use the same type for 1st argument: ## use the same type for 1st argument:
return ((logline[:0], date.isoformat(), logline), return ((logline[:0], date.isoformat(), logline.replace('\n', '\\n')),
time.mktime(date.timetuple()) + date.microsecond/1.0E6) time.mktime(date.timetuple()) + date.microsecond/1.0E6)
def seekToTime(self, date): def seekToTime(self, date):