yui-log.js revision eb9b6f817df5c660be9f00fc5d27fe33479fdc98
/**
* If the 'debug' config is true, a 'yui:log' event will be
* dispatched, which the logger widget and anything else
* can consume. If the 'useConsole' config is true, it will
* write to the browser console if available.
*
* @method log
* @for YUI
* @param {String} msg The message to log.
* @param {String} cat The log category for the message. Default
* categories are "info", "warn", "error", time".
* Custom categories can be used as well. (opt)
* @param {String} src The source of the the message (opt)
* @return {YUI} YUI instance
*/
// suppress log message if the config is off or the event stack
// or the event call stack contains a consumer of the yui:log event
// apply source filters
if (src) {
// console.log('checking src filter: ' + src + ', inc: ' + inc + ', exc: ' + exc);
// console.log('bail: inc list found, but src is not in list: ' + src);
bail = true;
// console.log('bail: exc list found, and src is in it: ' + src);
bail = true;
}
}
if (!bail) {
console[f](m);
}
}
// category filters are not used to suppress the log event
// so that the data can be stored and displayed later.
if (Y.fire) {
}
}
return Y;
};
}, "@VERSION@");