how to read 10 line from the last logfile in text file formatted, asap
Posted on 2002-07-11
i wanna ask some question about text files.
i got a logfile with 2 mb size and it can be increase in anytime.
i want to show all the logfile in text file formatted but it takes time for showing all that logfile. so i've decided to take at least 10 or 15 lines from the last of the logfile. and if the logfile was changing that changing should be included in a logfile too.
-open logfile in text file formatted
-show all the logfile in text file formatted
-show at least 10 or 15 from the last logfile
- if there's a changing between showing the text file, that changing should be include in the logfile
-and must be using a low resources and speed is critical
with this i had include the logfile sample.
can u help me with this? thanks expert for helping me. i need this source asap.
11072002 121100 Debug level = 3
11072002 121100 Debug Filename = c:\PROGRA~1\MAX\log\r2_in.log
11072002 121100 Voice Resource = 30
11072002 121100 Inter Digit Delay = 100
11072002 121100 DTI Cfg Filename = c:\PROGRA~1\MAX\etc\r2in.cfg
11072002 121100 DTI Map Filename = c:\PROGRA~1\MAX\etc\linemap.cfg
11072002 121100 TCP HostName = localhost
11072002 121100 TCP Port = 5000
11072002 121100 ISDN Cfg Filename =
11072002 121100 inifile=C:\PROGRAM FILES\MAX\etc\DTGC_IN.ini
11072002 121100 label = R2_IN
11072002 121100 [SYS] Init Tcp socket
11072002 121100 [SYS] Init VoiceBoard
11072002 121100 VC-Chn1 :InitVoice variable
11072002 121100 Open Voice resource dxxxB1C1, ts =0
11072002 121100 VC-Chn2 :InitVoice variable
11072002 121100 Open Voice resource dxxxB1C2, ts =1
11072002 121100 VC-Chn3 :InitVoice variable
11072002 121100 Open Voice resource dxxxB1C3, ts =2
11072002 121100 VC-Chn4 :InitVoice variable
11072002 121100 Open Voice resource dxxxB1C4, ts =3
11072002 121100 VC-Chn5 :InitVoice variable
11072002 121100 Open Voice resource dxxxB2C1, ts =4