mirror of https://github.com/fail2ban/fail2ban
(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).
parent
7a463eb3f7
commit
83f626c4aa
|
@ -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):
|
||||||
|
|
Loading…
Reference in New Issue