Tuesday, February 05, 2008
Exception Handling and Logging Framework
Milos has always provided features around exception handling. In this upcoming build however, we have formalized a lot of the functionality (and added to it as well) to create two distinct sub-frameworks:
- An Exception Handling framework
- A Logging framework
The idea is the exception logging framework is pretty simple: Whenever an exception occurs that remains unhandled, that exception can be "published" to the exception framework via a so-called "Exception Mediator" object. This object receives the exception and then passes it on to all kinds of interested listeners that can be registered with the mediator. Such listeners could be UI components to show exception information to the user (listener as well as UI components are provided by default and can be extended), or the information can be emailed to an administrator, or perhaps the information needs to be logged. The framework also includes components that can be used to retrieve detailed exception information such as an exception hierarchy or the current call stack.
The logging framework can be used to log various information ("events") to different destinations. For instance, it is possible to log events to text files or XML files of various formats. It is also possible to log to the Windows system log on the local machine or a remote machine. Furthermore, it is possible to log to email recipients or the Console or message boxes, or... And of course, it is also possible to easily combine all these loggers and even extend them with your own.
In addition to the class reference that includes examples for all these features, we have also written 2 whitepapers that explain the use of these frameworks.
Posted @ 4:55 PM by Egger, Markus (email@example.com)
Post a Comment:
Comment Title (required):
Your Name (optional):
Your Email (optional):
Your Web Site (optional):
Your Comment (required):