I would like to extract data continuously from some systemd log files. I have a regular expression which extracts what I'm interested in. What I'm not sure about is how to continously digest that file. I'm using tokio to keep things asynchronous.
I'm wondering if I should regularly (e.g. once per second) open that file, read into a buffer until the previously last line is matched, if I can keep that file open (I don't think this is a good idea from my Python experience, but I'm not sure if that would be ok in rust) or if there is another more elegant way to achieve that.
Thanks a lot in advance!