Logging

I'm looking for some information on how to do XData (or Sparkle) Server logging.


I've noticed a Logger/LogEngine properties in TXDataServerModule but no help about it.

How could I handle Requests? And/or Exceptions? 
Could I use TMS Logging to accomplish such tasks?

Any tips are wellcome.

Regards,

The best way would be using a Sparkle middleware (http://www.tmssoftware.biz/business/sparkle/doc/web/middleware.html).

This way you can intercept requests and log request info as you want, before forwarding it to the next middleware/module.

Hi Wagner, thanks.


Ok, can I write a Middleware that will run 'after' the XData module?

The middleware "runs" before and after. See "processing the response" in this topic, for example: http://www.tmssoftware.biz/business/sparkle/doc/web/custom_middleware.html

Sweet. That's why one should always RTFM ! 


Thanks very much Wagner. BTW, great the new feature for handling exceptions is out!

Regards,

Thanks Anderson, I'm glad you liked it.