views:

230

answers:

4

I am in the process of converting our logging implementation to use System.Diagnostics.TraceSource. We want to take advantage of activity tracing and we want to read multiple log files from multiple servers with tools like WCF's svctraceviewer & logparser.

I have converted our code to use TraceSource and now I am in the process of evaluating performance of trace listeners. Ultimately we want to take advantage of ETW but it will be a few months before we move to Windows Server 2008 so we cannot use EventProviderTraceListener yet. From the documentation it is clear that EventSchemaTraceListener is the best performing trace listener that produces text file output. Previously I had been using XmlWriterTraceListener and I was able to open up the logs created by it with svctraceviewer. Unfortunately EventSchemaTraceListener outputs different XML and although svctraceviewer does open and convert the file it doesn't do a great job and important fields are lost (like the text of the log message).

Is there a tool other than EventViewer on Vista & Windows 7 for reading the log files created by EventSchemaTraceListener. I was hoping to use svctraceviewer because it does a nice job of filtering and following activity tranfers.

I could write an XSLT transform to convert the XML to the format expected by svctraceviewer. If that is the only way to do this I will probably do that but I was hoping that there was already a tool to read the newer format output by EventSchemaTraceListener. Does anybody know?

Thanks.

dan

A: 

Plz check the site www.xpolog.com.I think you will get a clear idea.

Ramesh
Thanks. Looks promising but I was hoping to use free tools like WCF's svctraceviewer or logparser.
Dan Finucane
A: 

While I know this doesn't acutally answer your question, I think you should take a look at Log4Net. A lot of projects have used this logging framework with great success. It's very easy to use and pretty easy to extend and free software.

Mark Ewer
-1: this doesn't answer the question
John Saunders
I know it doesn't answer the question - I said that in the response. I just think that instrumenting your assemblies with Log4Net might be a better approach and is at least worth considering.
Mark Ewer
+1  A: 

I think what you want is TraceView. It's available as part of the DDK. (Not sure why it's not just part of the Platform SDK.)

Maybe not exactly what you're looking for, but the schema for the output XML file is called event.xsd. You can get it by downloading the Platform SDK.

Mike Post
A: 

Have you tried Microsoft Log Parser?

Quoting the download page:

Log parser is a powerful, versatile tool that provides universal query access to text-based data such as log files, XML files and CSV files, as well as key data sources on the Windows® operating system such as the Event Log, the Registry, the file system, and Active Directory®.

Note that I'm not a user of this tool (yet) - an evaluation of this has been on my TODO list for a while.

Given that it looks like it can handle practically any XML file format, I believe it'll do what you need.

Bevan