Hi Aman,
The logging block of the Enterprise lib is done just like all
other blocks. Instrumentation features can be added to it as described
below:
You have to install the Enterprise lib (it is free on the web).
1) Then you have to configure your Configuration file using the
wysiwyg -> Program Files->Enterprise Lib Configuration
2) Make a reference to the following dlls.
Microsoft.Practices.EnterpriseLibrary.Logging.dll
· Microsoft.Practices.EnterpriseLibrary.Common.dll
· Microsoft.Practices.EnterpriseLibrary.ObjectBuilder.dll
3) Then you add the namespace references to your application code
classes for the application blocks you want to use:
using Microsoft.Practices.EnterpriseLibrary.Logging;
using Microsoft.Practices.EnterpriseLibrary.Logging.ExtraInformation;
using Microsoft.Practices.EnterpriseLibrary.Logging.Filters;
4) To use the Instrumentation features of the Enterprise Library, also
add the following namespace to your classes
using System.Diagnostics;
For more information and a sample application, follow this link:
http://www.daveandal.net/articles/EntLibASPNET/EnterpriseLibraryInASPNET-2.htm
Regards,
Chike.