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
What is the use of viewmodel in mvc?
What are the benefits of .net framework?
What is a view engine?
What is the use .glimpse in mvc?
Is .net framework going away?
What is the difference between partial and renderpartial?
Do you know about the new features in asp.net mvc 4 (asp.net mvc4)?
what do you mean by table-per-hierarchy?
What is Separation of Concerns in ASP.NET ASP.Net MVC?
What is razor code?
What is the use of razor view engine?
Explain the new features added in version 4 of mvc (mvc4)?
Explain how you can send the result back in JSON format in MVC?
what is conceptual model?
Can I set the unlimited length for "maxjsonlength" property in config?