comect.sidecar.tailer module¶
-
class
comect.sidecar.tailer.
ThreadedTailer
(path, callback)¶ Bases:
object
A threaded logfile consumer. Spawns its own thread and uses it to tail a logfile.
- Parameters
This class can be used to monitor multiple files at the same time - simply instantiate it for each file, and call start() when you’re ready to go.
Note that this will start a thread for every file you’re tailing, so be aware of thread count limits on whatever host you’re using this on.
-
mark_stop
()¶ Set a flag to stop the thread - it will stop when the next line comes in.
-
start
()¶ Start the thread, and begin tailing the file.