My place of employment currently logs all calls, request and response, to a database. We're trying to create REST services to go along with our current SOAP services, and have so far been very impressed with Taffy, but one thing we haven't been able to find an elegant solution to is logging the calls... specifically the responses
Currently, the way I'm doing it that I pass in the mimExt to the resource functions in the onTaffyRequest function. Then at the end of each resource function, I check the arguments.mimeExt to see if the user requested XML or JSON, and then log either representationOf(local.qryResults).getAsXML() or representationOf(local.qryResults).getAsJSON()
This works, but we were hoping to find some solution that didn't involve us putting this logging code inside each function, and also not having to convert the results to XML/JSON twice for every function to be able to log it
Is there any better way to accomplish this that I'm just not seeing?
Thanks in advance