13 Commits

Author SHA1 Message Date
Ad Schellevis
7446f8cbbf logging: reverse_log_reader() - fix off by one error due to line ending at the end of the file
Usually log lines start with a line ending, which means the first hit is always an empty line with reading things backwards.
This empty line has no relevance, but only indicates we're at the end of the file.

This commits stores the file starting position in all cases and ignores the output when we trying to yield the end of the file.
2025-04-10 09:08:23 +02:00
Stephan de Wit
c522ecac65 configd: extend log query mechanism with streaming capability 2024-06-21 12:31:54 +02:00
Ad Schellevis
868c9531cd system: remove last bits of clog (circular logging) support, closes https://github.com/opnsense/core/issues/5892 2022-07-19 20:13:00 +02:00
Ad Schellevis
94a8906ef9 Generic log handling: ignore garbled data in log lines, closes https://github.com/opnsense/core/issues/4830 2021-03-15 19:45:31 +01:00
Ad Schellevis
8cf9c4fe08 fix previous, related to https://github.com/opnsense/core/issues/3831 2019-11-28 16:10:42 +01:00
Ad Schellevis
0844a5a27b log, minor bug in reverse log reader, when reading clog files, the beginning of the file isn't detected. found while working on https://github.com/opnsense/core/issues/3831 2019-11-28 15:56:57 +01:00
Ad Schellevis
5c6d780f8c logging, throw an exception when logfile doesn't look like a clog file, makes it easier to auto-detect clog/plain logs 2019-11-26 21:44:46 +01:00
Ad Schellevis
74f0022626 python, log_helper.py python 3 compatibility (supports 2 and 3 now) 2019-04-05 12:09:53 +02:00
Ad Schellevis
4cbc8e1dd1 python, improve performance of reverse_log_reader() by avoiding string copies while parsing. Tried the new method using a 50MB suricata log file, which was parsed about 30% quicker then using the previous version. 2018-05-20 18:45:13 +02:00
Franco Fichtner
342b898218 src: a bit of python code style 2018-04-06 05:37:31 +00:00
Ad Schellevis
407e4f1ded add clog reader to log_helper module 2017-10-16 21:48:25 +02:00
Ad Schellevis
f2599d3ae6 support stream input in reverse_log_reader() 2017-10-16 21:42:25 +02:00
Ad Schellevis
d567d90012 IPS, cleanup. move libs to shared location 2017-10-16 16:12:59 +02:00