Answer Posted / 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 View All Answers
How to Redirect Tracing to a File
i have done enough testing in life but now stated developing intereset in development work,Can i think of entering into development work that too in >Net after more then 4 years of testing experiece?
What are Action Filters in ASP.NET MVC and its use?
List the new features added in .net framework 4.0.
Mention what is the difference between “ActionResult” and “ViewResult” ?
What does a viewmodel do?
What is the "helperpage.isajax" property?
Do you know about the new features in asp.net mvc 4 (asp.net mvc4)?
How to make sure Client Validation is enabled in ASP.Net MVC
Which version of .net framework is installed?
Explain the role of assembly in the .net framework.
What are the advantages of asp.net mvc?
What is the use of web api ? Why web api needed, if you have already restful services using wcf ?
What is the .net framework?
What are actions in asp.net mvc?