Skip to content
Snippets Groups Projects

Pre-release fixes and code cleanup in L3 cybersecurity components

Merged Lluis Gifre Renom requested to merge feat/l3-components into develop
1 file
+ 4
4
Compare changes
  • Side-by-side
  • Inline
@@ -106,20 +106,20 @@ class l3_distributedattackdetector:
LOGGER.info("Gracefully stopping...")
def follow(self, file, time_sleep):
def follow(self, logfile, time_sleep):
"""
Generator function that yields new lines in a file
Generator function that yields new lines in a log file
"""
# seek the end of the file
# file.seek(0, os.SEEK_END)
# logfile.seek(0, os.SEEK_END)
chunk = ""
# start an infinite loop
while True:
# read last line of the file
line = file.readline()
line = logfile.readline()
# sleep if the file hasn't been updated
if not line:
Loading