Re: what is the best way to read text file
From: Alvin Bruney [MVP] (vapor)
Date: 02/14/05
- Next message: oscar: ".net and mysql join"
- Previous message: Samuel R. Neff: "Re: Capture Shift Held Down When Application Starts?"
- In reply to: Paul Clement: "Re: what is the best way to read text file"
- Next in thread: Paul Clement: "Re: what is the best way to read text file"
- Reply: Paul Clement: "Re: what is the best way to read text file"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 14 Feb 2005 13:47:30 -0500
logfiles follow a different formats depending on the various supported
standards.
If you are looking to parse the log file for errors or just security
concerns, you should instead resort to Microsoft's log parser utility which
ships free as an IIS resource download instead of re-inventing the wheel to
implement your own functionality. It contains the ability to parse logfiles
by firing legitimate sql queries against the raw text file.
It's quite a remarkable piece of machinery actually. The log parser utility
is a command line tool with no GUI interface so you have to learn all the
nuts and bolts. But i've built a web GUI front end that sits on top of
logparser available on www.logparser.com. Serverstats, which is open source
by the way, eliminates the need for the user to learn sql queries and the
nuts and bolts of the logparser utility which can be a bit intimidating. You
can point and click your way thru any w3c extended log file format.
-- Regards, Alvin Bruney [Microsoft MVP ASP.NET] [Shameless Author plug] The Microsoft Office Web Components Black Book with .NET Now Available @ http://www.lulu.com/owc ---------------------------------------------------------- "Paul Clement" <UseAdddressAtEndofMessage@swspectrum.com> wrote in message news:mgk1119p5tq0nfvtl8gsscgpdeppsnt581@4ax.com... > On Mon, 14 Feb 2005 04:53:31 -0600, "Guoqi Zheng"<no@sorry.com> wrote: > > ¤ Dear sir/lady, > ¤ > ¤ I need to process our web server log file every day. Normally, this file > is about 50MB - 100s MB big. How can I read the file in a effective way. > ¤ > ¤ I can open a streamreader to read it and use readline() function to read > line by line and process them. However, this sounds very slow. I can also > use readtoend to read everything into a string, but then I am afraid that > it will be too big for memory. > ¤ > ¤ How should I read the file? > > Don't think I've ever seen the contents of this file. Does it have any > type of structure? Does it > use field delimiters? > > > Paul ~~~ pclement@ameritech.net > Microsoft MVP (Visual Basic)
- Next message: oscar: ".net and mysql join"
- Previous message: Samuel R. Neff: "Re: Capture Shift Held Down When Application Starts?"
- In reply to: Paul Clement: "Re: what is the best way to read text file"
- Next in thread: Paul Clement: "Re: what is the best way to read text file"
- Reply: Paul Clement: "Re: what is the best way to read text file"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|