Microsoft Enterprise Library 6.0 Adds Semantic Logging
Microsoft has released Enterprise Library 6.0 with a Semantic Logging application block, support for Unity 3.0 and Windows Store apps, simplified usage, better documentation and overall experience.
Microsoft Enterprise Library (EL) contains standalone application blocks that can be combined to work together in order to solve various cross-cutting concerns such as DI, logging, error handling, data access, validating input, etc. The library helps by providing a uniform and standardized way to deal with those concerns in enterprise applications. Application blocks are pluggable and reusable components designed according to Microsoft’s guidelines for building .NET applications.
Beside application blocks, the Enterprise Library includes a number of configuration tools, core functions used by all blocks (such as serialization), code samples, hands-on labs, reference documentation, all the source code and unit tests used during its development. A reference implementation will be provided in May.
Enterprise Library 6.0 comes 3 years after EL 5.0 with a new application block, Semantic Logging, providing consistent format and structure of logging messages based on strongly typed events. Log messages can be saved simultaneously to multiple destinations including flat file, console window, database or Windows Azure storage. An example of generating a log message for a UI error in an application, taken from the Developer Guide (PDF), looks like this:
MyCompanyEventSource.Log.UIError("Validation Exception", 376, 16288, "Windows 8");
Semantic logging uses similar functionality as Event Tracing for Windows, and the same infrastructure when the out-of-process option is chosen.
The Data Access, Logging, Exception Handler, Transient Fault Handling, Policy Injection, Validation and Unity 3.0 application blocks have been updated, being simplified, having increased resilience to errors, being integrated with ASP.NET MVC and ASP.NET Web API, and including Unity registration by convention, according to Grigori Melnik, a Principal Program Manager for Microsoft patterns & practices. Also, Windows Store apps are supported, and the documentation and the overall experience with the library have been improved.
According to S. Somasegar, Corporate VP of the Developer Division at Microsoft, the Fault Handling block now deals with intermittent errors in distributed environments:
LOB apps are more and more likely to be running in distributed environments, where intermittent error conditions are not uncommon. The updated Transient Fault Handling Application Block, which helps to provide resilience against such conditions, has been updated with new detection strategies and with support for the new asynchronous programming features of C# 5 and Visual Basic 11, enabling increased scalability. It’s also now available as a portable library for use with .NET 4.5, Windows Store apps, and Windows Phone apps.
Enterprise Library 6.0 needs .NET Framework 4.5 and the recommended operating systems are: Windows 7/8 and Windows Server 2008 R2/2012. Where support for previous versions of .NET is needed, Enterprise Library 5.0 is the solution, which covers .NET 3.5, 4.0, and 4.5.
Tiago Romero Garcia Mar 01, 2015