Monitoring a large log file in C #

I need to control a large log file during the day using C #. The size is 200-300 MB per day.
What is the most effective way to analyze it? The file is locked by the manufacturer. Preferably, I would either read that I understand that the lines have been added or will read back.

+3
source share
3 answers

The combination MemoryMappedFileand FileSystemWatchershould do the trick.

+2
source

You will never achieve good results with C#.

C++, MFC String 1GB.
15-20 . char, 3 !!!!

C# , , C++ TCHAR, char, .

+2

Change the log rotation to a lower value and then process the rotated logs — or — first process the entire log file and remember fileoffset / line for the next check interval.

0
source

Source: https://habr.com/ru/post/1754959/


All Articles