Well… the first question about anything that comes in mind is What’s that? The best description is given by the Official Page of the tool which is as follows : Log Parser is a powerful, versatile tool that provides universal query access to
1. Text Based Data
- Log Files
- XML Files
- CSV Fies
- TSV Files
2. Data Sources
- W3C Files
- IIS Files
- IISW3C Files
- Event Log Files
- Registry Files
- File System
- Active Directory
Well, Log Parser is a command-line tool, that can be used to extract data out files and data sources.
It provides a very SQL-Like Language and the various files and data include IIS Log files, Active directory, File System, Event Log, Registry, Log4Net Log Files, Custom XML Files, CSV Files and much more….
Wow! Cool…! Isn’t it..? 🙂
How it works?
Well, Log Parser can be divided into three main components, namely the Input, the Processing Engine and the Output.
1. The Input:
Takes a file or multiple files of same type as an input. Most of them are specified above, but there are some more also which are supported as Input.
- 2. The Processing Engine:
The main Query engine, which parses the input file/s as with the given query.
The query is typically uses an SQL Dialect.
Actually, the best part is it not only uses the very familiar SQL format, but also uses many functions and expressions which make it very easy to filter out data as per our specific requirement.
Some common functions which generally are extensively used include:
LTRIM MAX MIN
3. The Output:
There are a number of output formats which are supported.
- SQL (sending the result of a query to an SQL Table)
- Template (User defined template, wow! this is cool… 🙂 )
Lets summarize it in a diagram..