Ah, the way to do it with no modification to MochiKit, using a
Listener:

if (console && console.log) {
        var logger = MochiKit.Logging.logger;
        logger.useNativeConsole = false;
        logger.addListener('firebug', null, function(msg) {
                var level = msg.level.toLowerCase();
                var f = console[level]? console[level] : console.log;
                f.apply(console, msg.info);
                return;
        });
}

On Feb 3, 8:37 am, "Martyn Smith" <[EMAIL PROTECTED]> wrote:
> The patch makes the most difference when you log objects as separate
> arguments (e.g. log('window: ', window) ). This allows you to click on
> the objects and examine them in the DOM tab of firebug.
>
> Also, logWarn, log etc have little icons now at the front of the
> console indicating the type of message.
>
> If that's not what you're seeing, something is different between how
> you and I applied the patch (well, I didn't apply it, might be how I
> generated it :( ), because that's certainly what I'm seeing :)
>
> On 2/3/07, isaac <[EMAIL PROTECTED]> wrote:
>
>
>
> > This patch didn't seem to make any difference with FireBug 1.0. In my
> > case logging works with FB  the first time a page is loaded, but once
> > it's reloaded, nothing. Only re-launching firefox will get it back.
>
> > (I'm using this within TurboGears, but substituting MochiKit from SVN
> > rather than 1.3).
>
> --
> Martyn


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to