Can I redirect tracing to a file



Can I redirect tracing to a file..

Answer / kirti

Yes. The Debug and Trace classes both have a Listeners property, which is a collection of sinks that receive the tracing that you send via Debug.WriteLine and Trace.WriteLine respectively. By default the Listeners collection contains a single sink, which is an

instance of the DefaultTraceListener class. This sends output to the Win32 OutputDebugString() function and also the System.Diagnostics.Debugger.Log() method. This is useful when debugging, but if you're trying to trace a problem at a customer site, redirecting the output to a file is more appropriate. Fortunately, the TextWriterTraceListener class is provided for this purpose.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net Framework Interview Questions

Name a few different return types of a controller action method?

0 Answers  


What is namespace used for loading assemblies at run time and name the methods?

2 Answers  


what is scalar property?

0 Answers   Microsoft,


If we want to construct our own Garbage collector what are the steps things we have to do?

3 Answers   Honeywell, Semantic Space,


What are non action methods in mvc?

0 Answers  






How does servicing work for the .net framework 3.0?

0 Answers  


What is filters in web api?

0 Answers  


What is edm (entity data model)? : Entity framework

0 Answers  


Explain Model, view and Controllers in Asp.Net MVC?

0 Answers  


What is the difference between windows vista and .net framework 3.0 ?

0 Answers  


WHICH IS THE BEST INSTITUTE FOR DOTNET REAL TIME PROJECT TRAINING

21 Answers   ABC, Cap Gemini, Comspark,


What is Peek method in Tempdata in ASP.Net MVC?

0 Answers  


Categories