Details
-
Type:
Task
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.6
-
Fix Version/s: 2.6
-
Component/s: JavaScript
-
Testing Instructions:
-
Affected Branches:MOODLE_26_STABLE
-
Fixed Branches:MOODLE_26_STABLE
-
Pull from Repository:
-
Pull Master Branch:
MDL-41985-master -
Pull Master Diff URL:
Description
YUI's Y.log statement supports additional options which we can make use of to ease our debugging woes.
See http://yuilibrary.com/yui/docs/api/classes/YUI.html#method_log:
(msg, cat, src, silent)
|
We can filter on the logLevel (
- debug
- info
- warn
- error
See http://yuilibrary.com/yui/docs/api/classes/config.html#property_logLevel
And we can exclude and include various statements by the src:
YUI_config.logInclude = {
|
'moodle-core-example': true
|
};
|
YUI_config.logExclude = {
|
'moodle-core-example': true
|
};
|
See:
- http://yuilibrary.com/yui/docs/api/classes/config.html#property_logInclude
- http://yuilibrary.com/yui/docs/api/classes/config.html#property_logExclude
We should then encourage people using Y.log in their code to add both priority and src so that the relevant log lines can be filtered at will.