When things go wrong
Not everything works as expected all the time. Most browsers provide some mechanism of seeing any client side JavaScript errors (if yours doesn't, you might want to check out Firefox; its JavaScript console is excellent).
Obviously, the browser's console can't help you with server-side errors, but don't believe we've left you completely on your own here either. Anything that causes your realm to throw a 500 error will be automatically logged. For example, this will be the case if you have a syntax error in one of your JavaScript instances (causing it not to compile), or one of your methods throws an uncaught exception. You can get at these logs, which are specific to your realm, by clicking the Logging link in the REALMS section of the portal.
Explicit logging
Sometimes you need a bit more fine-grained information than "an error occurred". Zimki provides a way to inject your own debug, warning & error messages into the realm log. For example, try going to the JavaScript Console link in the REALMS section of the portal and type in the following:
zimki.log.debug('the WHAM is getting hotter');
zimki.log.warn('the WHAM is overheating');
zimki.log.error('Failed cooling the WHAM');
Hit the Run button and go back to the log view. You should see the three lines above listed (in reverse order) with times when they occured and their severity.
See also
Parent
CookBook
|