appending and reading text file
<p>Environment: Any .Net Framework welcomed.
I have a log file that gets written to 24/7.</p>

<p>I am trying to create an application that will read the log file and process the data.</p>

<p>What's the best way to read the log file efficiently? I imagine monitoring the file with something like FileSystemWatcher. But how do I make sure I don't read the same data once it's been processed by my application? Or say the application aborts for some unknown reason, how would it pick up where it left off last?</p>

<p>There's usually a header and footer around the payload that's in the log file. Maybe an id field in the content as well. Not sure yet though about the id field being there.</p>

<p>I also imagined maybe saving the lines read count somewhere to maybe use that as bookmark.</p>
