I've been using tailer to tail a log file for a program.
I've been running into some issues as the program I am reading the log for creates a new log file on restart (of the same name); this causes me a major issue as tailer will not follow the new logfile (of the same name) when this occurs. It is running within a thread and it has to share memory with several other locations including code that has not been called through threading. Since tailer has an active thread open and running I can't just join the thread as it is still executing code and thus it's stuck. Is there a way around this (without using multiprocessing and killing it through that)?
import tailer
for line in tailer.follow(open("mytestfile.log", encoding='utf-8')):
#do some stuff with the line
That would be an example follow. Any recommendations to get around that?