drewp for 2006 July 22 (entry 0)

< New driver for Xyron Personal Cutting System
ayttm logging patch >

[Trackback URL for this entry] 2006-07-22T19:55:41 connecting the loggers of mochikit, firebug, and divmod:

This will save you about 50 seconds of RTFS, but maybe that's all that was stopping you from having a comfortable logging setup.

The plan is to redirect mochikit log() messages and divmod log messages into firebug, whose console will stay active over a reload, and can be turned on and off more easily than a mochikit in-the-page page.

Divmod.logger.addObserver(function(ev) {
  if (ev.channel == "transport") {
    return;
  }
  console.info("divmod (%s): %s", ev.channel, ev.message);
});

logger.addListener('logConsole', null, function(msg) {
  console.info(msg);
});

Now:

log("mochikit message");
console.info("firebug message");
Divmod.log("divmod message");
Filed under: web


[Main]

Unless otherwise noted, all content licensed by Drew Perttula
under a Creative Commons License.