| What is Logging in asp.net and features
Logging is one of the most useful feature or technique which is usually ignored by the developer but will re-add the feature once system is crashed. Developer will then try to add all logging methods to the code. We will use logging for doing many useful purpose as given below.
(1)Root Cause Analysis
(2)Bug Analysis
(3)For Performance Reviews
We can log to many location like flat file or databases. C# and vb.net both have internal libraries which helps to records log files. There are number of free framework available in market for logging. In .NET we have Event Viewer where we can log.
And one of the most common ways to log errors in windows is Event Viewer. Because this is utility which is available in every windows desktop.
It have one of the most important feature of Event Viewer that it will detect the crash and create entry for event viewer. without code in our application it will done automatically. Logs are very helpful when we have multilayered application or we can say very complex application.
There are 3 main logging levels in .NET
(1)Error:-This category mainly reserved for critical events just like crash of application and cause serious issues with user interaction.
(2)Warning:-This might not be crash of application but could have more critical errors. A warning is just a level that alerts the administrator of a possible problem.
(3)Information:-This will provide information regarding what is going behind the scenes in the application. | | |