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

What are the benefits of .net framework?

0 Answers  


mention what is code first approach and model first approach in entity framework?

0 Answers   Microsoft,


How to change the action name in ASP.Net MVC?

0 Answers  


What is the role of the jit compiler in .net framework?

0 Answers  


What's the access level of the visibility type internal ?

1 Answers  






What is the .net framework 3.0 (formerly winfx)?

0 Answers  


What is connected scenario? : Entity framework

0 Answers  


Mention some action filters which are used regularly in ASP.Net MVC?

0 Answers  


WHICH IS THE BEST INSTITUTE FOR DOTNET REAL TIME PROJECT TRAINING

21 Answers   ABC, Cap Gemini, Comspark,


How to add 'ASPNET.mdf' file into server explorer in visual studio 2005?

2 Answers  


What is Differnce between html.action and ajax.action?

0 Answers   HCL,


Will there be a .net compact framework 3.0 release with release of .net framework 3.0?

0 Answers  


Categories