Tail a log file (text file)
My question is how would I go about monitoring the last line of a log file and displaying it in a txtfield? Here is the scenario:
I have an application running that sends some events to a log file it keeps. Keep in mind that this file is opened by the application. I would like to read the last line of the log file and print that in my app, and then when ever it is updated print the new update.
Additionally a more advanced way would be the last 5 lines of the log file to get a semi-history. An even more advanced way would be to have a scrolling function to track all of it if the user needed to see if they'd missed something.
thank you