Hi Robert, you could derive from Qooxdoo's Rpc class and put your logger there.
Look at the attached file. It doesn't use logging, but it check's if the call fails and displays the error message in a popup dialog (not included, just try it with window.alert() instead. The file also looks for permission exceptions and calls a Login-window (not included) and repeats the call if login is sucessful. This is useful, e.g. if your session expired in the mean-time. We defined it as a singleton and it thus can be accessed everywhere in your code with var rpc = yourPath.RpcSmart.getInstance(); I think this should give you enough ideas to implement your logging infrastructure. Cheers, Fritz On Wed, 4 May 2011, Robert Larsen wrote:
Hey all Is there some way I can register a central callback to be notified with the result of all RPC calls ? I use RPC a lot of places and would like to have a logging mechanism for alerting the error description when things go wrong, and implementing this for all calls is a mess. Best, Robert
-- Oetiker+Partner AG tel: +41 62 775 9903 (direct) Fritz Zaucker +41 62 775 9900 (switch board) Aarweg 15 +41 79 675 0630 (mobile) CH-4600 Olten fax: +41 62 775 9905 Schweiz web: www.oetiker.ch
RpcSmart.js
Description: RpcSmart
------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
