Log Parser

Wednesday 24 August 2005

Jeff Atwood extolls the virtues of Microsoft Log Parser. It provides a SQL syntax for querying log files of diverse heritages. It sounds very cool, and damn handy. From a quick look through the source he provides, I didn't see how to plug in new input parsers, though the architecture diagram he shows has a block for them. With CSV and XML inputs available, I guess you could transform anything you like into something it could eat even without plugins.

tagged: » 3 reactions

Comments

[gravatar]
Mike Gunderloy 10:41 PM on 24 Aug 2005

To plug in a custom input parser, you write a COM object in the language of your choice that implements the ILogParserInputContext COM interface . There's a section in the help file on this, and some samples that install with the application. And if you get stuck, you can come on over to http://www.logparser.com and ask for help - the app's developer hangs around the forum and answers questions.

[gravatar]
Nate Finch 2:22 PM on 25 Aug 2005

LAME. Who wants to write a friggin' COM object just to define a log format? Typical microsoft. You should be able to just write an XML document that defines the log format.

Which is funny, because I'm working on a project at home with a very similar dynamic... you have an XML document which defines how to build a parser for other XML documents.

[gravatar]
Jeff Atwood 4:19 AM on 26 Aug 2005

Yeah, COM is lame. No argument there.

That said, you can download a sample C# project from the repository section of Mike's site that has the skeleton ILogParserInputContext COM interface already plugged in for you...

Add a comment:

name
email
Ignore this:
not displayed and no spam.
Leave this empty:
www
not searched.
 
Name and either email or www are required.
Don't put anything here:
Leave this empty:
URLs auto-link and some tags are allowed: <a><b><i><p><br><pre>.