NTrace is a library that provides flexible, high-performance, and zero-config trace logging for your C# applications.
NTrace is currently 100% C#.
(Did you come here looking for Johannes Passing's dynamic function boundary tracing toolkit? If so, click
What is NTrace?
NTrace is a combination of a runtime framework and a code preprocessor that provides an API for using
Event Tracing for Windows
(ETW) in your managed code. In practice, it's a lot like theWindows Trace Preprocessor
Why would I want to use NTrace?
There are two high-level reasons why you'd want to use NTrace. The first is that it allows you to have trace instrumentation that can be enabled and disabled at runtime without having to modify any configuration files. The second is that the tracing capabilities
provided by the ETW subsystem are very efficient and flexible. We've tried to preserve as much of the simplicity of using Trace.WriteLine while providing access to all of the features of WPP/ETW. The end result is that you have a great way to troubleshoot
your code when it's out in the field.
In order to use NTrace, your code needs to meet the following criteria:
- You must be using the .NET 2.0 (or later) runtime
- You must be using Visual Studio 2008 or Visual Studio 2010
- Your code must be C# (VB support still eludes us due to differences in the NRefactory parsers)
For more information (including a tutorial for how one can capture and view trace logs using NTrace/ETW) please refer to the
NTrace is made possible through the gracious agreement of
to allow the source for this project to be released to the public for general consumption and improvement, the efforts of Andy Hopper, a Senior Architect with
, and the handy NRefactory library developed by the team that brought you
NTrace is released under the Eclipse Public License and is free for all use. If you would like to contribute, please contact one of the project administrators.