PDA

View Full Version : How to enable console.log in ExtJs



lmeyer1
7 Oct 2013, 4:06 AM
I use ExtJS and include the framework with
<script src="ext/ext-dev.js"></script>.
Despite the fact that the ExtJS documentation makes extensive use of console.log, this function is not working, because it is somehow redefined to an empty function.
How can I enable console.log in ExtJS ? Is there a configuration option that I need to set on application loading ? Or is there another function used to log to the console ? (I found Ext.log, but it does not log to the console neither.)
ExtJS is redefining console.log. Outsite of ExtJs, alert(console.log);will output function log() { [native code ] }, inside of ExtJS, it will output only function log() {}, and console.log('message'); does nothing.

lmeyer1
7 Oct 2013, 5:01 AM
I found the culprit: It was another library I loaded along with ExtJS. So it is not ExtJS related.