The console service is intended to be thread-safe; you should be able to log messages to the service from any thread. Listeners registered with the service are proxied when they are registered. When a new message is logged, each listener will be notified (asynchronously) on the thread from which it was originally registered. (For this reason, each listener must be registered on a thread with an event queue.)
Retiring Old Messages
In order to prevent denial of service by a page that generates an unbounded number of errors, the console service maintains a LIFO circular buffer of messages, and begins retiring old messages once the message limit is reached.
Thanks to Martijn Pieters, we have a command line handler for the js console. To start up with the js console, use the