Trace Tab - Glimpse/Glimpse GitHub Wiki
The Trace tab shows any messages traced to System.Diagnostics.Trace or System.Diagnostics.Debug during the lifetime of the HTTP request.
- Message: The message that was traced
- Category: The category level of message
- From First: The duration, in milliseconds, from when the first trace message
- From Last: The duration, in milliseconds, from when the previous trace message
-
What type of Tracing does Glimpse support?
Glimpse supports the standard set of System.Diagnostics Trace and Debug methods:
- Trace.TraceWarning("...") : void
- Trace.TraceError("...") : void
- Trace.TraceInformation("...") : void
- Debug.Write("...") : void
The Trace tab can trace messages from instances of System.Diagnostics.TraceSource as well.
Configure the <system.diagnostics> section in web.config:
<system.diagnostics>
<sources>
<source name="Example Source" switchName="sourceSwitch" switchType="System.Diagnostics.SourceSwitch">
<listeners>
<add name="GlimpseListener"/>
</listeners>
</source>
</sources>
<switches>
<add name="sourceSwitch" value="Warning"/>
</switches>
<sharedListeners>
<add name="GlimpseListener" type="Glimpse.Core.TraceListener, Glimpse.Core"/>
</sharedListeners>
</system.diagnostics>
Once configured, write messages with a properly named instance of TraceSource:
var traceSource = new TraceSource("Example Source");
traceSource.TraceEvent(TraceEventType.Warning, 0, "Log message text...");