O'Reilly logo

Professional Microsoft IIS 8 by Benjamin Perkins, Dennis Glendenning, Scott Forsyth, Jeff Cochran, Kenneth Schaefer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Installing and Using LogParser

Originally included as an unsupported utility in the IIS 6 Resource Kit, LogParser is a simple command-line program that can parse almost any log file and generate output in a wide array of formats. The current version of LogParser can be downloaded from www.iis.net or the Downloads section of Microsoft's website.

Installing LogParser

LogParser is probably the easiest add-on to your web server that you will ever install. The LogParser download is a Microsoft installation file. Simply double-click the LogParser.msi file, and follow the installation prompts to install the entire package. The default installation is to a LogParser folder in \Program Files (x86).

LogParser consists of an executable file and a DLL, and you may want to copy those to a folder in the environment path, such as %WinDir%\System32\. This will allow you to execute LogParser from any folder; otherwise, you will need to specify file paths when using LogParser.

The LogParser installation also includes a compiled HTML help file, LogParser.chm, which includes full instructions and samples for running LogParser. Of particular interest is the reference section of the help file, which includes the query syntax as well as input and output formats.

Using LogParser from the Command Line

LogParser is a command-line tool and uses a query language similar to a SQL Server query to parse many types of log files, including IIS, FTP, and SMTP logs. The command line for LogParser is simply:

LogParser ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required