Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

Intercepting logging to take alternate/additional action



Is it possible to trap the logging of say an error so that as well as logging the error you could email it to a system administrator…

I have not had much time to go through the documentation so if it is documented then just let me know where to look.



Hi Darren,

Just have a look at the OnLogEntry event of the TSmartInspect class (in Delphi).

You can use the OnLogEntry event to intercept any log entry and test the ALogEntry.LogEntryType property for ltWarning/ltError (which can be found in the SmartInspectPackets unit). You can then take further actions depending on the log entry type.