How to customize Ext.Logger effectively?
For development, We can customize Ext.Logger mechanism and add colors to text as below
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;
});
Ext JS Interview Questions and Answers
ReplyDeletelinrismutri Adrian Viher https://wakelet.com/wake/-jhkFLsI1rbseopL6t9gt
ReplyDeletealmeseari
pierini_ha_1983 Diana Brown There
ReplyDeleteSoftware
cobbblacdanre