View Full Version : Logging in ExtJS

22 Dec 2010, 2:45 AM

We are finding that a lot of our bugs are intermitant, difficult to replicate, and even harder to track down. This has us thinking that some means of logging the state of our application at various points would be a huge help when something goes wrong.

We tried using window.console.log(), and tracked what came out using Firefox's Firebug console, which worked a treat. However, it was causing problems in Internet Explorer (I don't think it supports console.log()?) so the logging was eventually removed from our codebase.

Our question is... is there a reliable way to spit out log messages in ExtJS that will work cross-browser? We notice people mentioning Ext.log() in some forum posts, but this doesn't seem to exist anymore:

Are there any alternatives? How do you guys track what goes wrong during tricky hard-to-replicate bugs?


22 Dec 2010, 2:56 AM
We have made a debug console which is made using an extending Window, it logs all events that are fired, any errors that are picked up by using try/catch, shows all stores, all components and something we have intergrated ourselves which is a notifcationCenter, we made this so we can run methods in other classses etc which have no link.

I am sure you can do something like this which can log items and display data in a property grid/grid