Custom Tracing RRS feed

  • Question

  • I am trying to utilize custom tracing inside a business component using Trace class' WriteLine API.

    If I instantiate trace listener programmatically, it works.

    Trace.Listeners.Add(new TextWriterTraceListener(@"TextWriterOutput.log", "TextTraceListener"));
    Trace.WriteLine("Country: " + EmpInfo.Country);

    However, if I configure listener in the web.config, it does not work. Can someone point me my mistake? I am sure I am doing something wrong while configuring web.config

          <add initializeData="TextWriterOutput.log"
            type="System.Diagnostics.TextWriterTraceListener" name="TextTraceListener">
            <filter type="" />
        <trace autoflush="true" />

    • Edited by diffident Wednesday, April 16, 2014 9:38 PM
    Wednesday, April 16, 2014 9:35 PM


  • Hi,

    Please try specify the assembly into the type as below:



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, April 18, 2014 1:40 AM