Logging Framework
The Logging framework that ships with K2[blackpearl] allows for great customization both as to how messages are logged as well as how messages are filtered. The attached document explores the different ways to log messages as well as filtering the levels of messages that are filtered back.
I added a project on the blackmarket with full source code showing how to send an email message when an error message is raised within the K2 Logging framework.
Links:
Logging Framework Blackmarket Project
Attachment(s): Creating a Custom Logging Extension for K2.docx