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 |
Explain the use of Inversion of control (IOC)?
What is .net core framework?
What is the advantage of using asp.net routing?
Explain RenderBody and RenderPage in ASP.Net MVC?
Explain the new features added in version 4 of mvc (mvc4)?
what is model first approach?
What is session state management?
Why string are called Immutable data Type
Microsoft introduced c# as a de facto language of the .NET platform. What is mean by de facto and fot what purpose? Please answer me. Advance thanks.
What are the components required to create a route in mvc?
unit test done by tetser on development team?
mention what are the various methods provided by the dataset object to generate xml?