---
title: "[Tool] Easier log parsing with Log Parser"
url: "https://osherove.com/blog/2004/1/10/tool-easier-log-parsing-with-log-parser.md"
canonical: "https://osherove.com/blog/2004/1/10/tool-easier-log-parsing-with-log-parser.html"
published: "2004-01-10T14:50:00"
updated: "2004-01-10T14:50:00"
tags: ["Cool Articles", "Cool Tools", "Cool sites"]
author: "Roy Osherove"
description: "Speaking of parsing log files , There's a little known tool called LogParser , and it's from the Microsoft IIS team. This very powerful parser can easily parse various kinds of log files and you can actually query…"
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# \[Tool\] Easier log parsing with Log Parser

By Roy Osherove January 10, 2004 In [Cool Articles](https://osherove.com/blog/category/cool-articles), [Cool Tools](https://osherove.com/blog/category/cool-tools), [Cool sites](https://osherove.com/blog/category/cool-sites)

**Historical article** · Originally published January 10, 2004; technical details may be outdated.

Speaking of [parsing log files](http://weblogs.asp.net/rosherove/archive/2004/01/10/49414.aspx), There's a little known tool called [LogParser](http://www.microsoft.com/technet/treeview/default.asp?url=/technet/scriptcenter/logs/logparser/default.asp), and it's from the Microsoft IIS team. This very powerful parser can easily parse various kinds of log files and you can actually query against the data in a log file in an SQL-like syntax, or output the log into one of several formats, one of which is XML.

You can read more about this little known tool over at [www.logparser.com](http://www.logparser.com/) (maintained by [Mike Gunderloy](http://www.larkware.com/)). I recommend you take a long hard look and add it to your developer tool belt.

If you look at my [log parsing article](http://weblogs.asp.net/rosherove/archive/2004/01/10/49414.aspx) this tool covers all the functionality needed in that article out of the box. However, one thing this version does not do is parse log records that span multiple lines. For example:

**RecordStart**

**Start: 10.22.53**

**User: Name**

**Action: something**

**RecordEnd**

This kind of record in a log file cannot be parsed by LogParser, but using my technique you can parse this with relatively little effort. However, I'm told by Mike that the next version of [LogParser](http://www.microsoft.com/technet/treeview/default.asp?url=/technet/scriptcenter/logs/logparser/default.asp) will feature multiple line parsing, but you'd have to write your own plugin into the parser to achieve that (and it's plugin architecture will be based on COM, how's that for progress?)

Still, this is something I wish I'd looked into earlier (I've known about the tool but never actually checked it out)

## More in Cool Articles

[All posts in Cool Articles](https://osherove.com/blog/category/cool-articles)

- Jan 16, 2004

    ### [Hall of Technical Documentation Weirdness](https://osherove.com/blog/2004/1/16/hall-of-technical-documentation-weirdness.html)

- Jan 16, 2004

    ### [From VB6 to VB.Net - important webcasts](https://osherove.com/blog/2004/1/16/from-vb6-to-vbnet-important-webcasts.html)

- Jan 10, 2004

    ### [New MSDN article: Turn Your Log Files into Searchable Data Using Regex and the XML Classes](https://osherove.com/blog/2004/1/10/new-msdn-article-turn-your-log-files-into-searchable-data-us.html)

- Jan 9, 2004

    ### [Debugging Unit tests using the VS.net debugger](https://osherove.com/blog/2004/1/9/debugging-unit-tests-using-the-vsnet-debugger.html)


---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
