Ukadc.Diagnostics.Listeners.OutputDebugStringTraceListener

Description

An implementation of a CustomTraceListener that calls OutputDebugString with a formatted value thanks to a CombinedToken. The output of this TraceListener can be viewed using a tool like DebugView from SysInternals.

Example Usage

The first step is to add the OutputDebugStringTraceListener to your configured listeners

<source name="myTraceSource" switchValue="All">
  <listeners>
    <add type="Ukadc.Diagnostics.Listeners.OutputDebugStringTraceListener, Ukadc.Diagnostics" 
name="odsTraceListener" initializeData="{EventType}: {Id}, {Source}, {Message}" />
  </listeners>
</source>


The initializeData attribute specifies a CombinedToken.

Here's an example of the output for this token in DebugView from SysInternals

debugView.png

Last edited Apr 11, 2008 at 11:41 AM by joshtwist, version 5

Comments

No comments yet.