From: Greg Hauptmann Date: 2007-03-21T20:48:35+09:00 Subject: How to handle "System Exceptions" vs "Application Errors" vs "Audit Events" in a Rails App??? ------=_Part_109021_3241220.1174477712922 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi all, Just trying to cement by understanding of how to handle system exceptions/application errors/audit events for a Ruby on Rails application. How do people personally handle the following categories of events. a) Uncaught exceptions (i.e. bubble up to top) - Usage: System failure / developer can't do anything - Logging: How? Override rails exception framework to issue a specific "logger.error" message? Check whether a standard Rails "error" will be sent to the log by default anyway... - Alerting: Use of "exception_notification" plugin. b) Trapped exceptions (i.e. handle explicitly) - Usage: Understood application error (not system error) / Developer can offer value add - Logging: Issue a "logger.error" line - Alerting: How to hook into "exception_notification" plugin? c) Application Specific Audit - Usage: For application specific event (e.g. sale has occurred) and want an email alert and log it too. - Logging: Via use of "logger.info" system (? or need custom solution for audit logging?) - Alerting: How to hook into "exception_notification" plugin from this point? Any comments / ideas / best practice suggestions would be appreciated. Cheers Greg ------=_Part_109021_3241220.1174477712922--