Export (0) Print
Expand All

Modifying the Logging Application Block

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.

The Logging Application Block was designed to be used in a variety of applications and to provide general-purpose logging functionality. With extension points, you can adapt the application block to suit the needs of any particular application. However, if you want to add new features to the application block, you can do so by modifying the source code (the application block ships with both the source code and the binaries). In this case, consider the following recommendations.

Recommendations for Modifying the Logging Application Block

When modifying the source code, follow these best practices:

  • Make sure you understand how the application block works by reading the Design of the Logging Application Block section of this documentation.
  • Consider changing the Logging Application Block's namespace if you alter the code significantly or if you want to use your customized version of the application block along with the original version. Note that changing the application block's namespace requires you to update all other application blocks and applications that use the Logging Application Block to incorporate the new namespace.
  • Use strong naming. A strong name allows the assembly to be uniquely identified, versioned, and checked for integrity. You will need to generate your own key pair to sign your modified version of the application block. For more information, see Strong-Named Assemblies and Versioning Tutorial. Alternatively, you can choose to not sign your custom version. This is referred to as weak naming.
  • You must recompile your code for your modifications to take effect. Open the Logging Application Block's Visual Studio solution file and rebuild the entire solution.

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.
Show:
© 2015 Microsoft