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

Can I add mvc testcases in visual studio express?

0 Answers  


mention what is csdl, ssdl and msl sections in an edmx file?

0 Answers   Microsoft,


What is a serverside technology? what is a clientside technology? what is a clientserver technology? what is a internet based application? what is a intranet based application? what is a windows application? what is a console application? Difference between console application and windows application?

4 Answers   IBM,


What is the common property in .net?

1 Answers   Nth Solution,


What are multicast delegates ? give me an example

1 Answers  


What are non action methods in mvc?

0 Answers  


Is entity framework slow?

0 Answers  


What is connected scenario? : Entity framework

0 Answers  


What is razor code?

0 Answers  


Difference between <connectionstring> and <appsettings>

4 Answers  


Can I uninstall microsoft .net framework?

0 Answers  


What is edm designer? : Entity framework

0 Answers  


Categories