[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 340
  • Last Modified:

no output from TraceSource

Here is my config file...


        <system.diagnostics>
        <sources>
            <source name="raceCode" switchName="switch2">
                <listeners>
<!--                     <add initializeData="ELoft.log" type="System.Diagnostics.TextWriterTraceListener" name="ELoftLocalListener" />
                    <add name="consoleListener" /> -->
                </listeners>
            </source>
        </sources>
        <sharedListeners>
<!--            <add initializeData="ELoft.log" type="System.Diagnostics.TextWriterTraceListener" name="ELoftLocalListener" />
           <add name="consoleListener" type="System.Diagnostics.ConsoleListener"/> -->

        <!--     <add initializeData="output.xml" type="System.Diagnostics.XmlWriterTraceListener" name="xmlListener" traceOutputOptions="Timestamp" /> -->
            <add initializeData="ELoft.log" type="System.Diagnostics.DelimitedListTraceListener" name="ELoftListener" traceOutputOptions="Timestamp" />
            <add type="System.Diagnostics.ConsoleTraceListener" name=" consoleListener" traceOutputOptions="Timestamp" />
        </sharedListeners>
        <switches>
          <!--   <add name="switch1" value="Critical" /> -->
            <add name="switch2" value="Warning" />
        </switches>
    </system.diagnostics>

I have #define TRACE at the top of my file where I am doing the trace.  My trace statement looks like this:

            traceSource.TraceEvent(TraceEventType.Start, 0);  //  trace
            traceSource.TraceInformation("\n\n--> trace info\n\n");

and I flush() and close() when the program ends.  Why do I not get any output?  and where is it supposed to go?  I am running this under the debugger of VS 2005 Express.

Thanks in advance.
0
rmmarsh
Asked:
rmmarsh
  • 2
  • 2
1 Solution
 
devsolnsCommented:
<%@ Page Trace="true" %>
0
 
devsolnsCommented:
disregard my post, ; )
0
 
rmmarshAuthor Commented:
Moderator:  please close this... I figured it out myself.
0
 
rmmarshAuthor Commented:
I found the answer myself at http://msdn2.microsoft.com/en-US/library/system.diagnostics.tracesource(VS.80).aspx

The switch value has to be set to "All" to get what I was tracing.
0
 
kodiakbearCommented:
Closed, 500 points refunded.
kb
Experts Exchange Moderator
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now