What is tracing?Where it used.Explain few methods available



What is tracing?Where it used.Explain few methods available..

Answer / kirti

Tracing refers to collecting information about the application while it is running. You use tracing information to troubleshoot an application.

Tracing allows us to observe and correct programming errors. Tracing enables you to record information in various log files about the errors that might occur at run time. You can analyze these log files to find the cause of the errors.

In .NET we have objects called Trace Listeners. A listener is an object that receives the trace output and outputs it somewhere; that somewhere could be a window in your development environment, a file on your hard drive, a Windows Event log, a SQL Server or Oracle database, or any other customized data store.

The System.Diagnostics namespace provides the interfaces, classes, enumerations and structures that are used for tracing The System.Diagnostics namespace provides two classes named Trace and Debug that are used for writing errors and application execution information in logs.

All Trace Listeners have the following functions. Functionality of these functions is same except that the target media for the tracing output is determined by the Trace Listener.

Method Name

Result Fail Outputs the specified text with the Call Stack.

Write Outputs the specified text.

WriteLine Outputs the specified text and a carriage return.

Flush Flushes the output buffer to the target media.

Close Closes the output stream in order to not receive the tracing/debugging output.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net Framework Interview Questions

what is lazy loading in entity framework?

0 Answers   Microsoft,


i just want to write an exam regarding .net?plz give me information about taking a test?where to pay 4 d exam,exam centre?

0 Answers  


In which circumstances you used delegates?

5 Answers   HP,


What is GUID and why we need to use it and in what condition? How this is created

1 Answers  


What is orm entity framework?

0 Answers  






What is shared and private assembly ?

3 Answers   Accenture, BirlaSoft,


What is difference between constants, readonly and, static

1 Answers  


What are bundling & minification features in asp.net mvc 4?

0 Answers  


Explain Keep method in Tempdata in ASP.Net MVC?

0 Answers  


What is action methods in web api?

0 Answers  


What are the 2 ways of adding constraints to a route?

0 Answers  


What are Action Filters in ASP.NET MVC and its use?

0 Answers  


Categories