Looking for a little help to get started on a small project that I had in the back of my mind.
I have a log file whose size depends on how often they are cleared from 50-500 MB. I would like to write a program that will monitor the log file while it is being actively written. when used, they change pretty quickly a few hundred lines per second or so. Most, if not all examples that I saw for reading log / text files, simply open and read the contents of the file into a variable, which can not always be done every time the file changes in this situation. I didn’t settle in the language to write this, but its in the window window, and I can work in .net flavors / java / or php (hehe, I don’t think php will fly well for this), and maybe probably get confused through another language if someone has a suggestion for something well built to handle this.
Essentially, I believe that what I'm looking for is likely to be better described as a high-speed way to monitor a text file for changes and view changes. Each line written is relatively small. (less than 300 characters, so its small data in each line).
EDIT: change the wording to reliably better describe what I'm trying to do. Who writes the program to monitor the log file for the trigger, and then map the next action to this trigger. So my question is about processing files inside a programming language.
I really appreciate any thoughts and comments.
source
share