Re: Help with "TraceSwitch "
- From: "John Vottero" <John@xxxxxxxxx>
- Date: Fri, 24 Feb 2006 22:00:32 -0500
"David" <martindb@xxxxxxxxxxxxx> wrote in message
news:m23vv1pps0dd9u4jgtb9sofv4lnr5i7ebo@xxxxxxxxxx
I am attempting to use "TraceSwitch " in Win Forms (Below is the code
and the app.config). According to the manual, the program should
read the config for the setting, but this is not occurring. The
examples in the SDK and on the web appear to match mine, but I am not
sure if there is an error with my code or some additional setting.
====
The code is:
static TraceSwitch GeneralTS = new TraceSwitch("GeneralTS", "Entire
Application");
and the App.config is:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.diagnostics>
<switches>
<add name="Trace01" value="1" />
</switches>
</system.diagnostics>
</configuration>
Your trace switch is named "GeneralTS" in the code but it's called "Trace01"
in your config file. These names must match.
.
- References:
- Help with "TraceSwitch "
- From: David
- Help with "TraceSwitch "
- Prev by Date: assistance with moving through loops
- Next by Date: Re: Different Cursor on ListView
- Previous by thread: Help with "TraceSwitch "
- Next by thread: Serializing TreeView and DataGridView controls states
- Index(es):
Relevant Pages
|