I need to write a realtime monitoring application, which stores information from log-files into a gridview. + that they can be process further from other features/functions in my application.
I've running a Application on my server, which creates entries into a logfile at odd times. (csv-formatted)
These files can sometimes have up to 100mbs. I don't always want to scan/examine the whole file, because I know that new etries will always be added to the bottom of the file.
How should I construct the update-function (in my realtime monitoring application)?
- Should I compare the filesize, and if the filesize has changed? -> examine/update
- Should I examine the files every 1minute?
- Should I check for "Date-modified"?
By the way, a full scan is time-consuming, can this be reduced by only scanning for new entries?
So my question is: What is the best way to solve it?!