We are focusing on three blocks in the Enterprise Library; Logging, Configuration and Exception Handling. I'm looking at Logging first because everthing else will touch on the logging. What we need is to force three attributes into each log. These three are already provided in by the LogEntry object, these are; Application Name, Application Version and Event ID. Okay, so application version is not supplied by the LogEntry, but we can get that easy enough.
The other thing we want is that the custom logger or tracelistener or whatever it is we create must be inherited and cannot be instantiated on its own. While this sounds easy enough via an abstract class, it turned out not to be so practical. It seems that, while I can create an abstract class that inherits the ILogFormatter, that class can't be used in the Enterprise Library Configuration tool.
Hmmmm...I wonder if we can extend the Enterprise Library Configuration tool to force the required attributes and formatters. Now I have something else to look at.
I've been able to find some information on using Enterprise Library. One place which has links to tutorials (or at least is supposed to) is Channel9 Wiki. However, most the tutorials that would actually do me any good are by that Hisham Baz fellow, and I can't seem to get to his site from work. I'll have to try from home, perhaps it is just that exceptionally poor quality of internet service we experience here:
Channel9 Wiki
EnterpriseLibrary Home
EnterpriseLibrary MSDN blogs
MSDN EnterpriseLibrary page
Hands on Labs - EnterpriseLibrary 2
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment