The standard logging API in the browser could probably be followed:
Current server-side APIs:
I believe Jaxer may provide this API as well.
- Synchronet has a global log() method which allows logging of messages to consoles, files, etc. using the 8 standard Unix syslog severity levels: http://synchro.net/docs/jsobjs.html#global