How to customize Ext.Logger effectively? For development, We can customize Ext.Logger mechanism and add colors to text as below /** * Fancy Ext.Logger.warn(), error() * By including this file we'll force override of the Ext.Logger.warn() behavior. eg: Ext.Logger.error(errMsg); Ext.Logger.warn('Warning msg'); */ Ext.define('Master.util.Log', { singleton: true, /** * Logs color-coded console message; intended for development only * to be used in betwee debug directives. * @param {String} text to log */ warn: function(text) { console.log('%cWARN: %s', 'background: #222; color: orange', text); }, error: function(text) { console.log('%cERROR: %s', 'background: #d9e6ee; color: red', text); } }, function() { Ext.Logger.warn = Master.util.Log.warn; Ext.Logger.error = Master.util.Log.error; });
A foundation you can build.