A standard logging API has proven to be useful in many languages. This is especially true for server side environments where things are often running unattended (unlike client side work, where you are personally actively using the code that is doing the logging).
The standard logging API in the browser is one option:
console.log(...); console.debug(...); ...
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
- Java Logging is based on the pattern established by log4j to provide flexible logging.