    printfire = function () { 
     if (window.console && window.console.log) { 
         // This is Safari JS Console support, not in the FAQ version 
         window.console.log(arguments[0]); 
     } else if (document.createEvent) { 
         printfire.args = arguments; 
         var ev = document.createEvent("Events"); 
         ev.initEvent("printfire", false, true); 
         dispatchEvent(ev); 
     } 

    };
    
    printfire_listener = function (msg) { 
        printfire(msg.level + ": " + msg.info.join("")); 

    }; 

    MochiKit.Logging.logger.addListener("printfire", null,printfire_listener);