I d like my Restlet application to log the stack trace for any Resource that generates a 500-series HTTP error (using the Context s Logger). As far as I can tell, this is not the default behavior.
In other words, I don t want my Resource classes to have any logger code at all in the represent and acceptRepresentation methods - they just throw a ResourceException. I want the logging logic to be handled in a centralized way across all Resource instances.
I can think of a couple of hackish ways of doing this (e.g., inherit from a Resource subclass that handles the logging logic), but it just seems like this is something that should be built-in to the framework.
What am I missing?