log to an object

function log() {
    log.history = log.history || [];
    log.history.push( arguments );
    if ( window.console && the_thing.debug ) {
        window.console.log( Array.prototype.slice.call(arguments) );
    }
};