Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable console.log in ExtJs

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.

like image 711
Lorenz Meyer Avatar asked Mar 23 '23 03:03

Lorenz Meyer


1 Answers

ExtJS does no such thing, as you can see by visiting for example ExtJS API docs, which run on ExtJS, opening the console and running console.log(). Something else in your code must be causing this.

like image 118
Mchl Avatar answered Apr 01 '23 22:04

Mchl