Microsoft has released a cool little utility for searching log files.
The Log Parser 2.0 tool lets you run SQL-like queries on log files of almost any format, and then display the results in a file format of your choice, in a SQL database, or on a screen. Log Parser is available as a command-line tool and as a set of scriptable Component Object Model (COM) objects.
You can use Log Parser to:
- Quickly search for data and patterns in log files.
- Create a variety of reports.
- Export data to a SQL database.
- Convert data between different file formats.
Log Parser supports the following input formats:
- IISW3C: Internet Information Services (IIS) W3C Extended format.
- IIS: IIS-formatted and IIS-generated log files.
- IISMSID: Generated when the MSIDFILT filter or the CLOGFILT filter is installed.
- ODBC: IIS Open Database Connectivity (ODBC) format that reads data directly from the SQL table populated by IIS when the Web server is configured to log to an ODBC target.
- NCSA: National Center for Supercomputing Applications (NCSA) format.
- BIN: Binary file format that is generated by IIS 6.0. Contains the requests received by the virtual Web sites on the same server running IIS 6.0.
- URLSCAN: Generated by the URLScan filter if it is installed on IIS.
- HTTPERR: IIS 6.0 HTTP error log files format.
- W3C: W3C log file format, such as for personal firewall, Windows Media Services, and Exchange tracking logs.
- EVT: Event messaging format from the Windows Event log, including system, application, security, and custom event logs, as well as from event log backup files.
- FS: File information from the specified path, such as file size, creation time, and file attributes. It is similar to an advanced dir command.
- CSV: Generic comma-separated value format.
- TEXTWORD: Generic text format.
- TEXTLINE: Generic text format.