Right now when I'm running our application I check djConfig.isDebug using a global function and then depending on the boolean returned I console.debug messages out. Is there a way to extend console.debug or console to not fire out messages unless isDebug is true?

Hrmmm
Hey 2dor:
First, perhaps it should be noted that when isDebug is false, we define stub functions for the
console.*methods if they're not already defined. This isn't the same as "not logging" if you have Firebug installed, but for all users who don't have firebug, the effect is exactly that: logging statements have no effect. This means that whenisDebug == falseyour users probably aren't paying a noticeable price for your logging statements. Only users with firebug installed and enabled can see them in that case.That said, I understand (and have often thought about) the difference between calls to no-ops and not doing anything at all. The biggest problem that all logging frameworks face is that if the language they're written in doesn't support macros, your options are either to pass functions and not strings (which implies the expense of closure creation no matter what) or to recommend that users surround all logging statements with if blocks as you're doing now in order to *completely* eliminate the string allocation/function-call overhead of passing strings and objects into those no-op functions.
So Dojo has a couple of options:
console.conditionalLog()or similar. I don't have a strong opinion about this one.console.*calls of all types. This seems smart to me.What do you think?
Regards
BTW, there is a trac ticket
BTW, there is a trac ticket in for stripping console.* calls from the source as part of a build step. It is scheduled for Dojo 1.2 at the moment:
http://trac.dojotoolkit.org/ticket/1368