Logging


As mentioned earlier, the word Instrumentation has been dropped from the name of the latest Logging Application Block. This version of the block has been redesigned to take advantage of classes in the System.Diagnostics namespace in the .NET Framework 2.0, and a lot of time was spent by the Enterprise Library team to simplify the block and ensure that it performs faster than the previous version. The following are the primary changes for this block.

  • Refactoring the LogSinks. The System.Diagnostics namespace includes classes called traceListeners that serve the same purpose that LogSinks serve in the previous versions of the block. Therefore, in this version of the block, LogSinks have been replaced by concrete traceListeners.

  • Including the ability for a LogEntry to be associated with multiple Categories. Since Categories are used to filter and route a LogEntry, the ability to specify multiple Categories improves the flexibility of the block.

  • Exposing LogFilters as an extension point to the block. In the latest release, a provider for a LogFilter can be developed and used to extend the filtering capabilities of the block.

  • Eliminating the distribution strategies concept. This concept appeared overly complex to many users of the Logging and Instrumentation Application Block in the Enterprise Library for .NET Framework 1.1 version. The functionality for asynchronous logging that was provided by distribution strategies can still be achieved by "chaining" instances of the block together with TRaceListeners like the MsmqTraceListener.




Fenster Effective Use of Microsoft Enterprise Library(c) Building Blocks for Creating Enterprise Applications and Services 2006
Effective Use of Microsoft Enterprise Library: Building Blocks for Creating Enterprise Applications and Services
ISBN: 0321334213
EAN: 2147483647
Year: 2004
Pages: 103
Authors: Len Fenster

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net